Closes #355, but using deep_dup, which is only available in Rails 3.1
This commit is contained in:
parent
cba2b49410
commit
660b98655a
|
@ -1,3 +1,5 @@
|
|||
require 'active_support/core_ext/hash/deep_dup'
|
||||
|
||||
module SimpleForm
|
||||
class FormBuilder < ActionView::Helpers::FormBuilder
|
||||
attr_reader :template, :object_name, :object, :wrapper
|
||||
|
@ -98,7 +100,7 @@ module SimpleForm
|
|||
# given SimpleForm.time_zone_priority and SimpleForm.country_priority are used respectivelly.
|
||||
#
|
||||
def input(attribute_name, options={}, &block)
|
||||
options = @defaults.deep_merge(options) if @defaults
|
||||
options = @defaults.deep_dup.deep_merge(options) if @defaults
|
||||
|
||||
chosen =
|
||||
if name = options[:wrapper]
|
||||
|
|
Loading…
Reference in New Issue