diff options
Diffstat (limited to 'activemodel/lib')
-rw-r--r-- | activemodel/lib/active_model/translation.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/translation.rb b/activemodel/lib/active_model/translation.rb index 920a133159..6959f99b5e 100644 --- a/activemodel/lib/active_model/translation.rb +++ b/activemodel/lib/active_model/translation.rb @@ -48,8 +48,7 @@ module ActiveModel end defaults << :"attributes.#{attribute}" - defaults << options.delete(:default) if options[:default] - defaults << attribute.to_s.humanize + defaults << (options[:default] ? options.delete(:default) : attribute.to_s.humanize) options.reverse_merge! :count => 1, :default => defaults I18n.translate(defaults.shift, options) |