我有一个铁路装置,比如:
class Person
has_and_belongs_to_many :sports
...
end
class Checkin
belongs_to :person
...
end
class Sport
attr_accessible :name
has_and_belongs_to_many :people
...
end
我想得到一天里所有的人的支票, 但只能从哪得到 HABTM 记录 w/ “ 棒球” 的 < code> name code> 。 我如何才能做到这一点?