method
attribute_names
v7.1.3.2 -
Show latest stable
- Class:
ActiveModel::Attributes::ClassMethods
attribute_names()public
Returns an array of attribute names as strings.
class Person include ActiveModel::Attributes attribute :name, :string attribute :age, :integer end Person.attribute_names # => ["name", "age"]