Flowdock
method

attribute_method?

Importance_1
Ruby on Rails latest stable (v4.0.2) - 0 notes - Class: ActiveModel::Validations::ClassMethods
attribute_method?(attribute) public

Returns true if attribute is an attribute method, false otherwise.

class Person
  include ActiveModel::Validations

  attr_accessor :name
end

User.attribute_method?(:name) # => true
User.attribute_method?(:age)  # => false
Show source
Register or log in to add new notes.