Flowdock
method

attribute_names

Importance_1
v6.0.0 - Show latest stable - 0 notes - Class: 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"]
Show source
Register or log in to add new notes.