0

couponsとの間にHABTM 関係を構築していますusers

私のCouponクラスではhas_and_belongs_to_many :users、この関係に名前を付けて、ではなくrecipients呼び出すことができる方法がありますか?Coupon.recipientsCoupon.users

4

1 に答える 1

3
has_and_belongs_to_many :recipients, :class_name => "User"
于 2013-08-21T18:40:47.890 に答える