method

define_accessors

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…