Commit c366143b authored by jplang's avatar jplang

SQL Cleanup.

git-svn-id: e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 7d63f9d4
......@@ -28,8 +28,7 @@ class Principal < ActiveRecord::Base
has_many :members, :foreign_key => 'user_id', :dependent => :destroy
has_many :memberships,
lambda {joins(:project).
lambda {joins(:project).where.not(:projects => {:status => Project::STATUS_ARCHIVED})},
:class_name => 'Member',
:foreign_key => 'user_id'
has_many :projects, :through => :memberships
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment