method

define_accessors

rails latest stable - Class: ActiveRecord::Associations::Builder::Association
define_accessors(model, reflection)
private

Defines the setter and getter methods for the association class Post < ActiveRecord::Base

has_many :comments

end

Post.first.comments and Post.first.comments= methods are defined by this method…