Skip to content

Commit

Permalink
Fixed quoting bug in edge rails, made apparent when ActiveSupport.esc…
Browse files Browse the repository at this point in the history
…ape_html_entities_in_json = false
  • Loading branch information
danielmorrison committed May 20, 2008
1 parent 221caf2 commit 592ca4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/attribute_fu/associated_form_helper.rb
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions test/test/unit/associated_form_helper_test.rb
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 592ca4c

Please sign in to comment.