Upgraded to rails 3.1.8. Fixed various bugs in wiki.
This commit is contained in:
parent
cd91436f7f
commit
29a6cd8b62
106 changed files with 430 additions and 22436 deletions
|
|
@ -7,7 +7,11 @@ class User < ActiveRecord::Base
|
|||
|
||||
has_many :memberships, :dependent => :destroy
|
||||
has_many :groups, :through => :memberships
|
||||
has_one :ordergroup, :through => :memberships, :source => :group, :class_name => "Ordergroup"
|
||||
#has_one :ordergroup, :through => :memberships, :source => :group, :class_name => "Ordergroup"
|
||||
def ordergroup
|
||||
Ordergroup.joins(:memberships).where(memberships: {user_id: self.id}).first
|
||||
end
|
||||
|
||||
has_many :workgroups, :through => :memberships, :source => :group, :class_name => "Workgroup"
|
||||
has_many :assignments, :dependent => :destroy
|
||||
has_many :tasks, :through => :assignments
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue