diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-03-07 20:58:54 +0000 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-03-07 20:58:54 +0000 |
commit | 67b17d029a8eeddd908cce2d4e0e27e4708e8463 (patch) | |
tree | 4cd589411104f7222835dd5012f4bb7743e1d215 /actionpack/lib/action_view/helpers/form_helper.rb | |
parent | bb063b2f1b3e5b6fb2a4732cb696929f1652c555 (diff) | |
parent | 5968d7a65886d3450698889f685eccaf54749f43 (diff) | |
download | rails-67b17d029a8eeddd908cce2d4e0e27e4708e8463.tar.gz rails-67b17d029a8eeddd908cce2d4e0e27e4708e8463.tar.bz2 rails-67b17d029a8eeddd908cce2d4e0e27e4708e8463.zip |
Merge branch 'master' into nested_has_many_through
Diffstat (limited to 'actionpack/lib/action_view/helpers/form_helper.rb')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_helper.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index 669ccd2a2d..6df86ae65a 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -6,6 +6,7 @@ require 'active_support/core_ext/class/attribute' require 'active_support/core_ext/hash/slice' require 'active_support/core_ext/object/blank' require 'active_support/core_ext/string/output_safety' +require 'active_support/core_ext/array/extract_options' module ActionView # = Action View Form Helpers @@ -880,9 +881,9 @@ module ActionView private - def instantiate_builder(record, record_object = nil, options = nil, &block) - options, record_object = record_object, nil if record_object.is_a?(Hash) - options ||= {} + def instantiate_builder(record, *args, &block) + options = args.extract_options! + record_object = args.shift case record when String, Symbol |