Hi,
I have a Project model and a TaskType model. Association between the two occurs through a ProjectTaskType model (backed by a link/join table in the DB with foreign keys to both Projects and TaskTypes).
A Project has_many TaskTypes :through ProjectTaskType, and a TaskTypes has_many Projects :through ProjectTaskType.
I have a vew with an embedded scaffold and want to display all TaskTypes belonging to a given Project.
Can someone quide me as to how I would write the conditions for this?
<%= render
:active_scaffold => :task_type,
:label => 'Task Types',
:conditions => "TaskTypes which are associated with @project
through the ProjectTaskType" %>
And can my filtering logic go elsewhere?
Thanks