我有两个型号看起来像这样由协会(DataMapper的)
class Stage
include DataMapper::Resource
property :id, Serial
belongs_to :staff
end
class Staff
include DataMapper::Resource
property :id, String, :key => true
property :full_name, String
property :email, String
has n, :stages
end
我试图找到具有分配一个特定的职员各个阶段查找。我试过@stages = Stage.all(Stage.Staff => 'TM')
我在做什么错?
谢谢,这很有帮助。 – Tom 2010-07-10 09:35:55