From f9472f064fae12d0890075d698d8e5fd81289392 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Fri, 25 Mar 2011 00:30:29 +0100 Subject: applies API guidelines to example --- actionpack/lib/action_view/helpers/javascript_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb index 136d006ad1..5a1d07fd24 100644 --- a/actionpack/lib/action_view/helpers/javascript_helper.rb +++ b/actionpack/lib/action_view/helpers/javascript_helper.rb @@ -121,8 +121,8 @@ module ActionView # The +href+ attribute of the tag is set to "#" unles +html_options+ has one. # # link_to_function "Greeting", "alert('Hello world!')", :class => "nav_link" - # Produces: - # Greeting + # # => Greeting + # def link_to_function(name, function, html_options={}) onclick = "#{"#{html_options[:onclick]}; " if html_options[:onclick]}#{function}; return false;" href = html_options[:href] || '#' -- cgit v1.2.3