attribute_method?

attribute_method?(attribute) Instance Public methods Returns true if attribute is an attribute method and table exists, false otherwise. class Person < ActiveRecord::Base end Person.attribute_method?('name') # => true Person.attribute_method?(:age=) # => true Person.attribute_method?(:nothing) # => false

read_attribute_before_type_cast

read_attribute_before_type_cast(attr_name) Instance Public methods Returns the value of the attribute identified by attr_name before typecasting and deserialization. class Task < ActiveRecord::Base end task = Task.new(id: '1', completed_on: '2012-10-21') task.read_attribute('id') # => 1 task.read_attribute_before_type_cast('id') # => '1' task.read_attribute('completed_on') # => Sun, 21 Oct 2012 task.read_attribute_b

attributes_before_type_cast

attributes_before_type_cast() Instance Public methods Returns a hash of attributes before typecasting and deserialization. class Task < ActiveRecord::Base end task = Task.new(title: nil, is_done: true, completed_on: '2012-10-21') task.attributes # => {"id"=>nil, "title"=>nil, "is_done"=>true, "completed_on"=>Sun, 21 Oct 2012, "created_at"=>nil, "updated_at"=>nil} task.attributes_before_type_cast # => {"id"=>nil, "title"=>nil, "is_done"=>true, "c

[]

[](name) Instance Public methods

new

new() Class Public methods

new

new(message, exception, attribute) Class Public methods

attributes=

attributes=(new_attributes) Instance Public methods Alias for: assign_attributes

assign_attributes

assign_attributes(new_attributes) Instance Public methods Allows you to set all the attributes by passing in a hash of attributes with keys matching the attribute names (which again matches the column names). If the passed hash responds to permitted? method and the return value of this method is false an ActiveModel::ForbiddenAttributesError exception is raised. attributes=

run

run(preloader) Class Public methods

preloaded_records

preloaded_records() Class Public methods