diff options
Diffstat (limited to 'app/models/role.rb')
-rw-r--r-- | app/models/role.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/role.rb b/app/models/role.rb index 15ed0e10d..d393582c0 100644 --- a/app/models/role.rb +++ b/app/models/role.rb @@ -39,8 +39,8 @@ class Role < ActiveRecord::Base ['own', :label_issues_visibility_own] ] - scope :sorted, order("#{table_name}.builtin ASC, #{table_name}.position ASC") - scope :givable, order("#{table_name}.position ASC").where(:builtin => 0) + scope :sorted, lambda { order("#{table_name}.builtin ASC, #{table_name}.position ASC") } + scope :givable, lambda { order("#{table_name}.position ASC").where(:builtin => 0) } scope :builtin, lambda { |*args| compare = (args.first == true ? 'not' : '') where("#{compare} builtin = 0") |