I've got two models that look like this
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
I'm trying to find all Stages that have a specific Staff member assigned. I've tried @stages = Stage.all(Stage.Staff => 'TM')
What am I doing wrong?