instance method
lookup_ancestors
Ruby on Rails 3.1.12
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 35
def lookup_ancestors
self.ancestors.select { |x| x.respond_to?(:model_name) }
end
Defined in activemodel/lib/active_model/translation.rb line 35
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Translation