instance method
lookup_ancestors
Ruby on Rails 6.0.6
Since v3.0.20Signature
lookup_ancestors()
When localizing a string, it goes through the lookup returned by this method, which is used in ActiveModel::Name#human, ActiveModel::Errors#full_messages and ActiveModel::Translation#human_attribute_name.
Source
# File activemodel/lib/active_model/translation.rb, line 34
def lookup_ancestors
ancestors.select { |x| x.respond_to?(:model_name) }
end
Defined in activemodel/lib/active_model/translation.rb line 34
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Translation