Permalink
Browse files

Fixed quoting bug in edge rails, made apparent when ActiveSupport.esc…

…ape_html_entities_in_json = false
  • Loading branch information...
1 parent 221caf2 commit 131d9bd48fd5acf7fdfa52f94f72e8393f6e1fdc @danielmorrison danielmorrison committed with May 20, 2008
Showing with 4 additions and 4 deletions.
  1. +1 −1 lib/attribute_fu/associated_form_helper.rb
  2. +3 −3 test/test/unit/associated_form_helper_test.rb
View
2 lib/attribute_fu/associated_form_helper.rb
@@ -54,7 +54,7 @@ def remove_link(name, *args)
css_selector = options.delete(:selector) || ".#{@object.class.name.split("::").last.underscore}"
function = options.delete(:function) || ""
- function << "$(this).up(&quot;#{css_selector}&quot;).remove()"
+ function << "$(this).up('#{css_selector}').remove()"
@template.link_to_function(name, function, *args.push(options))
end
View
6 test/test/unit/associated_form_helper_test.rb
@@ -76,7 +76,7 @@ def setup
end
should "infer the name of the current @object in fields_for" do
- assert_match "$(this).up(&quot;.comment&quot;).remove()", @erbout
+ assert_match "$(this).up('.comment').remove()", @erbout
end
end
@@ -86,7 +86,7 @@ def setup
end
should "use the alternate selector" do
- assert_match "$(this).up(&quot;.blah&quot;).remove()", @erbout
+ assert_match "$(this).up('.blah').remove()", @erbout
end
end
@@ -97,7 +97,7 @@ def setup
end
should "still infer the name of the current @object in fields_for, and create the function as usual" do
- assert_match "$(this).up(&quot;.comment&quot;).remove()", @erbout
+ assert_match "$(this).up('.comment').remove()", @erbout
end
should "append the secondary function" do

0 comments on commit 131d9bd

Please sign in to comment.