attribute_names()
Instance Public methods
Returns an array of column names as strings if it's not an abstract class and table exists. Otherwise it returns an empty array.
class Person < ActiveRecord::Base end Person.attribute_names # => ["id", "created_at", "updated_at", "name", "age"]
Please login to continue.