多対多関連には、has_many :through
モデルクラスに"has_many :through"を記述することで中間テーブルを意識しないで関連テーブルを扱えるとか。
class Entry < ActiveRecord::Base has_many :中間テーブル has_many :関連テーブル, :through=>:中間テーブル end
モデルクラスに"has_many :through"を記述することで中間テーブルを意識しないで関連テーブルを扱えるとか。
class Entry < ActiveRecord::Base has_many :中間テーブル has_many :関連テーブル, :through=>:中間テーブル end