mirror of
https://github.com/redmine/redmine.git
synced 2025-12-16 05:20:28 +01:00
use "do end" instead of {} at ActiveRecord scope lambda of app/models/journal.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20319 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -61,14 +61,14 @@ class Journal < ActiveRecord::Base
|
|||||||
before_create :split_private_notes
|
before_create :split_private_notes
|
||||||
after_create_commit :send_notification
|
after_create_commit :send_notification
|
||||||
|
|
||||||
scope :visible, lambda {|*args|
|
scope :visible, (lambda do |*args|
|
||||||
user = args.shift || User.current
|
user = args.shift || User.current
|
||||||
options = args.shift || {}
|
options = args.shift || {}
|
||||||
|
|
||||||
joins(:issue => :project).
|
joins(:issue => :project).
|
||||||
where(Issue.visible_condition(user, options)).
|
where(Issue.visible_condition(user, options)).
|
||||||
where(Journal.visible_notes_condition(user, :skip_pre_condition => true))
|
where(Journal.visible_notes_condition(user, :skip_pre_condition => true))
|
||||||
}
|
end)
|
||||||
|
|
||||||
safe_attributes(
|
safe_attributes(
|
||||||
'notes',
|
'notes',
|
||||||
|
|||||||
Reference in New Issue
Block a user