instance method
i18n_keys
Ruby on Rails edge
Since v7.1.6 Private — implementation detail, not part of the public APISignature
i18n_keys()
No documentation comment.
Source
# File activemodel/lib/active_model/naming.rb, line 226
def i18n_keys
@i18n_keys ||= if @klass.respond_to?(:lookup_ancestors)
# Anonymous ancestors have no model name to derive a key from, so
# skip them rather than letting Name.new raise on their blank name.
@klass.lookup_ancestors.filter_map do |klass|
klass.model_name.i18n_key unless klass.name.blank?
end
else
[]
end
end
Defined in activemodel/lib/active_model/naming.rb line 226
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Name