mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-20 07:21:12 +00:00
cleanup: rubocop: fix Layout/AlignArguments in app/models/role.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18947 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
7f59b33e39
commit
ea859aedca
@ -78,17 +78,21 @@ class Role < ActiveRecord::Base
|
||||
validates_presence_of :name
|
||||
validates_uniqueness_of :name
|
||||
validates_length_of :name, :maximum => 255
|
||||
validates_inclusion_of :issues_visibility,
|
||||
validates_inclusion_of(
|
||||
:issues_visibility,
|
||||
:in => ISSUES_VISIBILITY_OPTIONS.collect(&:first),
|
||||
:if => lambda {|role| role.respond_to?(:issues_visibility) && role.issues_visibility_changed?}
|
||||
validates_inclusion_of :users_visibility,
|
||||
:if => lambda {|role| role.respond_to?(:issues_visibility) && role.issues_visibility_changed?})
|
||||
validates_inclusion_of(
|
||||
:users_visibility,
|
||||
:in => USERS_VISIBILITY_OPTIONS.collect(&:first),
|
||||
:if => lambda {|role| role.respond_to?(:users_visibility) && role.users_visibility_changed?}
|
||||
validates_inclusion_of :time_entries_visibility,
|
||||
:if => lambda {|role| role.respond_to?(:users_visibility) && role.users_visibility_changed?})
|
||||
validates_inclusion_of(
|
||||
:time_entries_visibility,
|
||||
:in => TIME_ENTRIES_VISIBILITY_OPTIONS.collect(&:first),
|
||||
:if => lambda {|role| role.respond_to?(:time_entries_visibility) && role.time_entries_visibility_changed?}
|
||||
:if => lambda {|role| role.respond_to?(:time_entries_visibility) && role.time_entries_visibility_changed?})
|
||||
|
||||
safe_attributes 'name',
|
||||
safe_attributes(
|
||||
'name',
|
||||
'assignable',
|
||||
'position',
|
||||
'issues_visibility',
|
||||
@ -98,7 +102,7 @@ class Role < ActiveRecord::Base
|
||||
'managed_role_ids',
|
||||
'permissions',
|
||||
'permissions_all_trackers',
|
||||
'permissions_tracker_ids'
|
||||
'permissions_tracker_ids')
|
||||
|
||||
# Copies attributes from another role, arg can be an id or a Role
|
||||
def copy_from(arg, options={})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user