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

cleanup: rubocop: fix Style/MultilineTernaryOperator in app/models/message.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@18902 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2019-11-05 14:08:14 +00:00
parent 1bd403015a
commit 7f2e36824e
2 changed files with 9 additions and 3 deletions

View File

@ -1264,7 +1264,6 @@ Style/MultilineTernaryOperator:
- 'app/models/issue_query.rb'
- 'app/models/issue_relation.rb'
- 'app/models/mail_handler.rb'
- 'app/models/message.rb'
- 'lib/redmine/ciphering.rb'
- 'lib/redmine/scm/adapters/filesystem_adapter.rb'
- 'lib/redmine/scm/adapters/git_adapter.rb'

View File

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