diff options
Diffstat (limited to 'activemodel/lib')
-rw-r--r-- | activemodel/lib/active_model/translation.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/translation.rb b/activemodel/lib/active_model/translation.rb index dc11198c66..2ad8ca9dea 100644 --- a/activemodel/lib/active_model/translation.rb +++ b/activemodel/lib/active_model/translation.rb @@ -45,6 +45,9 @@ module ActiveModel # it will underscore then humanize the class name (BlogPost.human_name #=> "Blog post"). # Specify +options+ with additional translating options. def human(options={}) + return @human unless @klass.respond_to?(:lookup_ancestors) && + @klass.respond_to?(:i18n_scope) + defaults = @klass.lookup_ancestors.map do |klass| klass.model_name.underscore.to_sym end |