##// END OF EJS Templates
add builtin named_scope...
Nicolas Chuche -
r1790:562d3aa6a647
parent child
Show More
@@ -19,6 +19,11 class Role < ActiveRecord::Base
19 19 # Built-in roles
20 20 BUILTIN_NON_MEMBER = 1
21 21 BUILTIN_ANONYMOUS = 2
22
23 named_scope :builtin, lambda { |*args|
24 compare = 'not' if args.first == true
25 { :conditions => "#{compare} builtin = 0" }
26 }
22 27
23 28 before_destroy :check_deletable
24 29 has_many :workflows, :dependent => :delete_all do
General Comments 0
You need to be logged in to leave comments. Login now