Merge branch 'issue_dashboard' into improved_dashboard

This commit is contained in:
Dmitriy Zaporozhets 2011-12-08 15:05:01 +02:00
commit 8e0126e9ec
20 changed files with 247 additions and 22 deletions

View file

@ -25,6 +25,15 @@ class User < ActiveRecord::Base
:foreign_key => :assignee_id,
:dependent => :destroy
has_many :merge_requests,
:foreign_key => :author_id,
:dependent => :destroy
has_many :assigned_merge_requests,
:class_name => "MergeRequest",
:foreign_key => :assignee_id,
:dependent => :destroy
before_create :ensure_authentication_token
alias_attribute :private_token, :authentication_token
scope :not_in_project, lambda { |project| where("id not in (:ids)", :ids => project.users.map(&:id) ) }