1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-19 15:01:14 +00:00

cleanup: rubocop: fix Layout/AlignArguments in app/models/journal.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@18936 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2019-11-08 00:46:13 +00:00
parent 513e869c93
commit 12fbc3a817

View File

@ -55,10 +55,12 @@ class Journal < ActiveRecord::Base
where(Journal.visible_notes_condition(user, :skip_pre_condition => true))
}
safe_attributes 'notes',
:if => lambda {|journal, user| journal.new_record? || journal.editable_by?(user)}
safe_attributes 'private_notes',
:if => lambda {|journal, user| user.allowed_to?(:set_notes_private, journal.project)}
safe_attributes(
'notes',
:if => lambda {|journal, user| journal.new_record? || journal.editable_by?(user)})
safe_attributes(
'private_notes',
:if => lambda {|journal, user| user.allowed_to?(:set_notes_private, journal.project)})
# Returns a SQL condition to filter out journals with notes that are not visible to user
def self.visible_notes_condition(user=User.current, options={})