Resourcified roles.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8145 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2011-12-09 23:29:58 +00:00
parent b127f9157d
commit 532a76f78c
10 changed files with 82 additions and 57 deletions
+1
View File
@@ -26,6 +26,7 @@ class Role < ActiveRecord::Base
['own', :label_issues_visibility_own]
]
default_scope :order => 'builtin, position'
named_scope :givable, { :conditions => "builtin = 0", :order => 'position' }
named_scope :builtin, lambda { |*args|
compare = 'not' if args.first == true