Adds a replacement for deprecated link_to_function helper.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10092 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-07-28 15:26:45 +00:00
parent 42fdc1d54d
commit 6e7507d580
1 changed files with 4 additions and 0 deletions

View File

@ -983,6 +983,10 @@ module ApplicationHelper
}.merge(options)
end
def link_to_function(name, function, html_options={})
content_tag(:a, name, {:href => '#', :onclick => "#{function}; return false;"}.merge(html_options))
end
def back_url_hidden_field_tag
back_url = params[:back_url] || request.env['HTTP_REFERER']
back_url = CGI.unescape(back_url.to_s)