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

.rubocop_todo.yml
app/models/project.rb

index 2233e177efd75e177fc8bd145ab5b266dbd83391..bb64ef7a6bf5cf25a3bd7a40b0c398050e011594 100644 (file)
@@ -106,7 +106,6 @@ Layout/IndentFirstArgument:
 # SupportedStyles: special_inside_parentheses, consistent, align_brackets
 Layout/IndentFirstArrayElement:
   Exclude:
-    - 'app/models/project.rb'
     - 'app/models/setting.rb'
     - 'lib/redmine/nested_set/issue_nested_set.rb'
     - 'lib/redmine/nested_set/project_nested_set.rb'
index 6c88093f217537eb88153cf062905ee207397839..d4af06ca1b441293c4803c1b5dc06ea8a8f33357 100644 (file)
@@ -633,20 +633,22 @@ class Project < ActiveRecord::Base
 
   # The earliest start date of a project, based on it's issues and versions
   def start_date
-    @start_date ||= [
-     issues.minimum('start_date'),
-     shared_versions.minimum('effective_date'),
-     Issue.fixed_version(shared_versions).minimum('start_date')
-    ].compact.min
+    @start_date ||=
+      [
+        issues.minimum('start_date'),
+        shared_versions.minimum('effective_date'),
+        Issue.fixed_version(shared_versions).minimum('start_date')
+      ].compact.min
   end
 
   # The latest due date of an issue or version
   def due_date
-    @due_date ||= [
-     issues.maximum('due_date'),
-     shared_versions.maximum('effective_date'),
-     Issue.fixed_version(shared_versions).maximum('due_date')
-    ].compact.max
+    @due_date ||=
+      [
+        issues.maximum('due_date'),
+        shared_versions.maximum('effective_date'),
+        Issue.fixed_version(shared_versions).maximum('due_date')
+      ].compact.max
   end
 
   def overdue?