From edd68a587f412ccdf15613c663acbab341d45017 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 24 Jul 2007 16:48:57 +0000 Subject: Refactored in use of extract_options! (closes #9079) [josh] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7220 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/helpers/javascript_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_view/helpers/javascript_helper.rb') diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb index 4dd7854367..51cbfb95d9 100644 --- a/actionpack/lib/action_view/helpers/javascript_helper.rb +++ b/actionpack/lib/action_view/helpers/javascript_helper.rb @@ -80,7 +80,7 @@ module ActionView # return false;">Show me more # def link_to_function(name, *args, &block) - html_options = args.last.is_a?(Hash) ? args.pop : {} + html_options = args.extract_options! function = args[0] || '' html_options.symbolize_keys! @@ -111,7 +111,7 @@ module ActionView # page[:details].visual_effect :toggle_slide # end def button_to_function(name, *args, &block) - html_options = args.last.is_a?(Hash) ? args.pop : {} + html_options = args.extract_options! function = args[0] || '' html_options.symbolize_keys! -- cgit v1.2.3