module ActiveRecord::AttributeMethods::ClassMethods

def attribute_method?(attribute)

Person.attribute_method?(:nothing) # => false
Person.attribute_method?(:age=) # => true
Person.attribute_method?('name') # => true

end
class Person < ActiveRecord::Base

+false+ otherwise.
Returns +true+ if +attribute+ is an attribute method and table exists,
def attribute_method?(attribute)
  super || (table_exists? && column_names.include?(attribute.to_s.delete_suffix("=")))
end