Method: ActiveModel::Translation#lookup_ancestors

Defined in:
activemodel/lib/active_model/translation.rb

#lookup_ancestorsObject

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.



34
35
36
# File 'activemodel/lib/active_model/translation.rb', line 34

def lookup_ancestors
  ancestors.select { |x| x.respond_to?(:model_name) }
end