From: Toshi MARUYAMA Date: Sat, 9 Nov 2019 16:05:07 +0000 (+0000) Subject: cleanup: rubocop: fix Layout/BlockAlignment in app/models/time_entry.rb X-Git-Tag: 4.1.0~75 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fb84731bcdc8ebb9c42c2e5b30b403ae5065da31;p=redmine.git cleanup: rubocop: fix Layout/BlockAlignment in app/models/time_entry.rb git-svn-id: http://svn.redmine.org/redmine/trunk@19028 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 9cc849026..b6be89b0a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -14,13 +14,6 @@ Layout/AlignHash: Enabled: false -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyleAlignWith. -# SupportedStylesAlignWith: either, start_of_block, start_of_line -Layout/BlockAlignment: - Exclude: - - 'app/models/time_entry.rb' - # Cop supports --auto-correct. Layout/BlockEndNewline: Exclude: diff --git a/app/models/time_entry.rb b/app/models/time_entry.rb index 60bbf8ec5..38359294d 100644 --- a/app/models/time_entry.rb +++ b/app/models/time_entry.rb @@ -28,11 +28,12 @@ class TimeEntry < ActiveRecord::Base belongs_to :activity, :class_name => 'TimeEntryActivity' acts_as_customizable - acts_as_event :title => Proc.new { |o| - related = o.issue if o.issue && o.issue.visible? - related ||= o.project - "#{l_hours(o.hours)} (#{related.event_title})" - }, + acts_as_event :title => + Proc.new {|o| + related = o.issue if o.issue && o.issue.visible? + related ||= o.project + "#{l_hours(o.hours)} (#{related.event_title})" + }, :url => Proc.new {|o| {:controller => 'timelog', :action => 'index', :project_id => o.project, :issue_id => o.issue}}, :author => :user, :group => :issue,