aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-07-07 10:02:39 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-07-07 10:02:39 -0700
commit9eeb3cc040f9ab701279d73aa76f12737cedd3fb (patch)
tree012ccc88de0df14f5df33c1c5ead488bf3702e40 /actionview/lib/action_view/helpers
parent09f6fe1cd4099837c5801fe654804ae058c211b4 (diff)
parentbcc30d8f2fc50ff096fd045cf9e507ce547a739d (diff)
downloadrails-9eeb3cc040f9ab701279d73aa76f12737cedd3fb.tar.gz
rails-9eeb3cc040f9ab701279d73aa76f12737cedd3fb.tar.bz2
rails-9eeb3cc040f9ab701279d73aa76f12737cedd3fb.zip
Merge pull request #11348 from sanemat/fix/link-to-block
Fix actionview link_to with block and url_hash
Diffstat (limited to 'actionview/lib/action_view/helpers')
-rw-r--r--actionview/lib/action_view/helpers/url_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/url_helper.rb b/actionview/lib/action_view/helpers/url_helper.rb
index 19e5941971..daa9a393b3 100644
--- a/actionview/lib/action_view/helpers/url_helper.rb
+++ b/actionview/lib/action_view/helpers/url_helper.rb
@@ -172,7 +172,7 @@ module ActionView
# link_to "Visit Other Site", "http://www.rubyonrails.org/", data: { confirm: "Are you sure?" }
# # => <a href="http://www.rubyonrails.org/" data-confirm="Are you sure?">Visit Other Site</a>
def link_to(name = nil, options = nil, html_options = nil, &block)
- html_options, options = options, name if block_given?
+ html_options, options, name = options, name, block if block_given?
options ||= {}
html_options = convert_options_to_data_attributes(options, html_options)