Added merge request dashboard, showing all merge requests assigned to

you across projects.
This commit is contained in:
Ariejan de Vroom 2011-12-08 01:07:02 +01:00
parent 1a3af33fce
commit e4b1f38c27
10 changed files with 90 additions and 2 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) ) }