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

cleanup: rubocop: fix Layout/BlockEndNewline in app/models/message.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@19047 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2019-11-09 17:57:00 +00:00
parent 5025dc975e
commit 02876fb1bf
2 changed files with 11 additions and 14 deletions

View File

@ -14,11 +14,6 @@
Layout/AlignHash: Layout/AlignHash:
Enabled: false Enabled: false
# Cop supports --auto-correct.
Layout/BlockEndNewline:
Exclude:
- 'app/models/message.rb'
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentOneStep, IndentationWidth. # Configuration parameters: EnforcedStyle, IndentOneStep, IndentationWidth.
# SupportedStyles: case, end # SupportedStyles: case, end

View File

@ -33,15 +33,17 @@ class Message < ActiveRecord::Base
:description => :content, :description => :content,
:group => :parent, :group => :parent,
:type => Proc.new {|o| o.parent_id.nil? ? 'message' : 'reply'}, :type => Proc.new {|o| o.parent_id.nil? ? 'message' : 'reply'},
:url => Proc.new {|o| :url =>
{:controller => 'messages', :action => 'show', Proc.new {|o|
:board_id => o.board_id}. {:controller => 'messages', :action => 'show',
merge( :board_id => o.board_id}.
if o.parent_id.nil? merge(
{:id => o.id} if o.parent_id.nil?
else {:id => o.id}
{:id => o.parent_id, :r => o.id, :anchor => "message-#{o.id}"} else
end)} {:id => o.parent_id, :r => o.id, :anchor => "message-#{o.id}"}
end)
}
acts_as_activity_provider :scope => preload({:board => :project}, :author), acts_as_activity_provider :scope => preload({:board => :project}, :author),
:author_key => :author_id :author_key => :author_id