mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
:href should be comming in through html_options and not options
This commit is contained in:
committed by
Stefan Penner
parent
f661a3bc59
commit
c0f63883ea
@@ -304,7 +304,7 @@ module ActionView
|
||||
end
|
||||
|
||||
attributes.merge!(html_options)
|
||||
href = options[:href].nil? ? "#" : options[:href]
|
||||
href = html_options[:href].nil? ? "#" : html_options[:href]
|
||||
attributes.merge!(:href => href)
|
||||
|
||||
content_tag(:a, name, attributes)
|
||||
|
||||
@@ -103,7 +103,7 @@ class AjaxHelperTest < AjaxHelperBaseTest
|
||||
|
||||
test "link_to_remote using explicit :href" do
|
||||
expected = %(<a href=\"http://www.example.com/testhref\" data-remote=\"true\" data-url=\"http://www.example.com/whatnot\" data-condition=\"$('foo').val() == true\">Remote outauthor</a>)
|
||||
assert_dom_equal expected, link_to_remote("Remote outauthor", :href => 'http://www.example.com/testhref', :url => { :action => "whatnot" }, :condition => '$(\'foo\').val() == true')
|
||||
assert_dom_equal expected, link_to_remote("Remote outauthor", {:url => { :action => "whatnot" }, :condition => '$(\'foo\').val() == true'}, :href => 'http://www.example.com/testhref')
|
||||
end
|
||||
|
||||
test "link_to_remote using :submit" do
|
||||
|
||||
Reference in New Issue
Block a user