unstuck! This does what I wanted.
named_scope :custodian_is, lambda {|cust_id| {:conditions =>
{ :file_set_id => FileSet.custodian_is(cust_id) } }}
along the way, I was also confused between the automatic scopes
for .with_attribute and for .attribute_is.
On Jul 17, 9:13 pm, Montgomery Kosma <[email protected]> wrote:
> I have 3 primary tables, as follows:
>
> dataset belongs_to employee
> project has_many employees through project_employees
> project has_many datasets through project_datasets
>
> I need to retrieve all the project_datasets for a given project &
> employee combination.
>
> Hobo gives me ProjectDataSet.with_project(proj_id) to restrict to the
> identified project, but I need to further restrict to the datasets for
> a given employee. E.g.,
>
> named_scope :with_employee, lambda { |empl_id| {:include
> => :employee, :conditions => ___________ } }
>
> Now I'm stuck: what goes in the blank?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---