Rspec models Milestone, Commit, UsersProject

This commit is contained in:
Dmitriy Zaporozhets 2013-01-03 19:11:14 +02:00
parent 2095780f24
commit e6c0673ef1
5 changed files with 157 additions and 1 deletions

View file

@ -35,6 +35,10 @@ class UsersProject < ActiveRecord::Base
delegate :name, :email, to: :user, prefix: true
scope :guests, where(project_access: GUEST)
scope :reporters, where(project_access: REPORTER)
scope :developers, where(project_access: DEVELOPER)
scope :masters, where(project_access: MASTER)
scope :in_project, ->(project) { where(project_id: project.id) }
class << self