I have three models for users. User, role & assignments. This is how the models look:
assignment.rb
# == Schema Information
# Schema version: 201011
The question was...given that users (clients) have already been added to a project owned by another user (a designer), how do I retrieve those users
That is pretty straight forward :
# Given a project @project = Project.find(id)
@clients = @project.users.joins(:roles).where("roles.name = 'client'")