search for: assignment_id

Displaying 1 result from an estimated 1 matches for "assignment_id".

2006 Jun 09
1
finder_sql issue with has_many :through
..._many :mod_privileges, :finder_sql => [''SELECT assignments.* FROM assignments INNER JOIN permissions ON assignments.publisher_id = permissions.publisher_id WHERE permissions.user_id = #{current_user.id} AND (permissions.role_id = 3 OR (permissions.role_id = 4 and permissions.assignment_id = assignments.id))''] and a simple test bit I threw into the view: <%= debug(current_user.mod_privileges) %> I was using has_many :through, but there seemed to be no way to do an inner join on something other than the column referencing the main select table. Suggestions? --...