提交 3ab98cf6 编写于 作者: S Santiago Pastorino

If default is provided don't add attribute.to_s.humanize to the options

上级 0dbf4ac7
......@@ -48,8 +48,7 @@ def human_attribute_name(attribute, options = {})
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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册