]> source.dussan.org Git - redmine.git/commitdiff
cleanup: rubocop: fix Layout/BlockAlignment in app/models/time_entry.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 9 Nov 2019 16:05:07 +0000 (16:05 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 9 Nov 2019 16:05:07 +0000 (16:05 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@19028 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
app/models/time_entry.rb

index 9cc8490267c2813584c0207f5aeeac1f05fd6c5c..b6be89b0afc991a38977d89f7abc700cfa7f9b32 100644 (file)
 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:
index 60bbf8ec5d884e555608bcc01d500e2dbd0839ee..38359294d4f740e94ccca5519e1653b4c3622263 100644 (file)
@@ -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,