mirror of
https://github.com/redmine/redmine.git
synced 2025-12-15 21:10:27 +01:00
use "do end" instead of {} at ActiveRecord scope lambda of app/models/role.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20345 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -55,10 +55,10 @@ class Role < ActiveRecord::Base
|
||||
|
||||
scope :sorted, lambda {order(:builtin, :position)}
|
||||
scope :givable, lambda {order(:position).where(:builtin => 0)}
|
||||
scope :builtin, lambda { |*args|
|
||||
scope :builtin, (lambda do |*args|
|
||||
compare = (args.first == true ? 'not' : '')
|
||||
where("#{compare} builtin = 0")
|
||||
}
|
||||
end)
|
||||
|
||||
before_destroy :check_deletable
|
||||
has_many :workflow_rules, :dependent => :delete_all
|
||||
|
||||
Reference in New Issue
Block a user