So, you want to select active tasks for the user, right?

How about this (pseudo code, not actually tested)?

class User
  has_many :task_assignments
  has_many :tasks, through: :task_assignments
  has_many :active_tasks, through: :task_assignments, conditions:
{task_assignments: {disabled: false}},  source: :tasks
end

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" 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/rails-oceania?hl=en.

Reply via email to