model_name()
Instance Public methods
Returns an ActiveModel::Name object for module. It can be used to retrieve all kinds of naming-related information (See ActiveModel::Name for more information).
1 2 3 4 5 6 7 | class Person < ActiveModel::Model end Person.model_name # => Person Person.model_name. class # => ActiveModel::Name Person.model_name.singular # => "person" Person.model_name.plural # => "people" |
Please login to continue.