From 2b24ccc6419c8ee9923a25816b15a80d7aaa5ea8 Mon Sep 17 00:00:00 2001 From: kuntoaji Date: Thu, 6 Jan 2011 06:46:19 +0700 Subject: [PATCH] make harmony works with rails 3. more info: http://pastie.org/private/o6sri73teazpf3dv3eq --- lib/harmony/page.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/harmony/page.rb b/lib/harmony/page.rb index d175dbe..5bd4ade 100644 --- a/lib/harmony/page.rb +++ b/lib/harmony/page.rb @@ -73,7 +73,9 @@ def initialize(document=nil) # def load(*paths) paths.flatten.each do |path| - window.load(path.to_s) + path.to_s.map {|f| + window.evaluate(File.read(f).gsub(/\A#!.*$/, ''), f, 1) + }.last end self end