Przeglądaj źródła

Layout/IndentationConsistency

Maarten van den Berg 6 lat temu
rodzic
commit
0f84721c47

+ 0 - 13
.rubocop.yml

@@ -58,19 +58,6 @@ Layout/IndentHash:
58 58
     - 'config/environments/development.rb'
59 59
     - 'config/environments/production.rb'
60 60
 
61
-# Offense count: 19
62
-# Cop supports --auto-correct.
63
-# Configuration parameters: EnforcedStyle.
64
-# SupportedStyles: normal, rails
65
-Layout/IndentationConsistency:
66
-  Exclude:
67
-    - 'app/controllers/activities_controller.rb'
68
-    - 'app/controllers/api/people_controller.rb'
69
-    - 'app/controllers/groups_controller.rb'
70
-    - 'app/controllers/members_controller.rb'
71
-    - 'app/controllers/people_controller.rb'
72
-    - 'app/helpers/authentication_helper.rb'
73
-
74 61
 # Offense count: 18
75 62
 # Cop supports --auto-correct.
76 63
 # Configuration parameters: Width, IgnoredPatterns.

+ 18 - 18
app/controllers/activities_controller.rb

@@ -309,26 +309,26 @@ class ActivitiesController < ApplicationController
309 309
 
310 310
   private
311 311
 
312
-    # The Activity's group takes precedence over whatever's in the URL, set_group not required (and can be mislead)
313
-    def set_activity_and_group
314
-      @activity = Activity.find(params[:id] || params[:activity_id])
315
-      @group = @activity.group
316
-    end
312
+  # The Activity's group takes precedence over whatever's in the URL, set_group not required (and can be mislead)
313
+  def set_activity_and_group
314
+    @activity = Activity.find(params[:id] || params[:activity_id])
315
+    @group = @activity.group
316
+  end
317 317
 
318
-    def set_group
319
-      @group = Group.find(params[:group_id])
320
-    end
318
+  def set_group
319
+    @group = Group.find(params[:group_id])
320
+  end
321 321
 
322
-    def set_subgroup
323
-      @subgroup = Subgroup.find(params[:subgroup_id])
324
-    end
322
+  def set_subgroup
323
+    @subgroup = Subgroup.find(params[:subgroup_id])
324
+  end
325 325
 
326
-    # Never trust parameters from the scary internet, only allow the white list through.
327
-    def activity_params
328
-      params.require(:activity).permit(:name, :description, :location, :start, :end, :deadline, :reminder_at, :subgroup_division_enabled, :no_response_action)
329
-    end
326
+  # Never trust parameters from the scary internet, only allow the white list through.
327
+  def activity_params
328
+    params.require(:activity).permit(:name, :description, :location, :start, :end, :deadline, :reminder_at, :subgroup_division_enabled, :no_response_action)
329
+  end
330 330
 
331
-    def subgroup_params
332
-      params.require(:subgroup).permit(:name, :is_assignable)
333
-    end
331
+  def subgroup_params
332
+    params.require(:subgroup).permit(:name, :is_assignable)
333
+  end
334 334
 end

+ 4 - 4
app/controllers/api/people_controller.rb

@@ -15,8 +15,8 @@ class Api::PeopleController < ApiController
15 15
 
16 16
   private
17 17
 
18
-    # Use callbacks to share common setup or constraints between actions.
19
-    def set_person
20
-      @person = Person.find(params[:id])
21
-    end
18
+  # Use callbacks to share common setup or constraints between actions.
19
+  def set_person
20
+    @person = Person.find(params[:id])
21
+  end
22 22
 end

+ 15 - 15
app/controllers/groups_controller.rb

@@ -156,22 +156,22 @@ class GroupsController < ApplicationController
156 156
 
157 157
   private
158 158
 
159
-    # Use callbacks to share common setup or constraints between actions.
160
-    def set_group
161
-      @group = Group.find(params[:group_id] || params[:id])
162
-    end
159
+  # Use callbacks to share common setup or constraints between actions.
160
+  def set_group
161
+    @group = Group.find(params[:group_id] || params[:id])
162
+  end
163 163
 
164
-    # Retrieve DefaultSubgroup to update or delete
165
-    def set_default_subgroup
166
-      @defaultsubgroup = DefaultSubgroup.find(params[:default_subgroup_id])
167
-    end
164
+  # Retrieve DefaultSubgroup to update or delete
165
+  def set_default_subgroup
166
+    @defaultsubgroup = DefaultSubgroup.find(params[:default_subgroup_id])
167
+  end
168 168
 
169
-    # Never trust parameters from the scary internet, only allow the white list through.
170
-    def group_params
171
-      params.require(:group).permit(:name)
172
-    end
169
+  # Never trust parameters from the scary internet, only allow the white list through.
170
+  def group_params
171
+    params.require(:group).permit(:name)
172
+  end
173 173
 
174
-    def default_subgroup_params
175
-      params.require(:default_subgroup).permit(:name, :is_assignable)
176
-    end
174
+  def default_subgroup_params
175
+    params.require(:default_subgroup).permit(:name, :is_assignable)
176
+  end
177 177
 end

+ 17 - 17
app/controllers/members_controller.rb

@@ -134,24 +134,24 @@ class MembersController < ApplicationController
134 134
 
135 135
   private
136 136
 
137
-    # Use callbacks to share common setup or constraints between actions.
138
-    def set_member
139
-      @member = Member.find(params[:id])
140
-    end
137
+  # Use callbacks to share common setup or constraints between actions.
138
+  def set_member
139
+    @member = Member.find(params[:id])
140
+  end
141 141
 
142
-    def set_group
143
-      @group = Group.find(params[:group_id])
144
-    end
142
+  def set_group
143
+    @group = Group.find(params[:group_id])
144
+  end
145 145
 
146
-    # Never trust parameters from the scary internet, only allow the white list through.
147
-    def member_params
148
-      params.require(:member).permit(:person_id, :is_leader)
149
-    end
146
+  # Never trust parameters from the scary internet, only allow the white list through.
147
+  def member_params
148
+    params.require(:member).permit(:person_id, :is_leader)
149
+  end
150 150
 
151
-    # Never trust parameters from the scary internet, only allow the white list
152
-    # through.  Note: differs from the ones in PeopleController because
153
-    # creating admins is not allowed.
154
-    def invite_params
155
-      params.require(:person).permit(:first_name, :infix, :last_name, :email, :birth_date)
156
-    end
151
+  # Never trust parameters from the scary internet, only allow the white list
152
+  # through.  Note: differs from the ones in PeopleController because
153
+  # creating admins is not allowed.
154
+  def invite_params
155
+    params.require(:person).permit(:first_name, :infix, :last_name, :email, :birth_date)
156
+  end
157 157
 end

+ 12 - 12
app/controllers/people_controller.rb

@@ -100,18 +100,18 @@ class PeopleController < ApplicationController
100 100
 
101 101
   private
102 102
 
103
-    # Use callbacks to share common setup or constraints between actions.
104
-    def set_person
105
-      @person = Person.find(params[:id])
106
-    end
103
+  # Use callbacks to share common setup or constraints between actions.
104
+  def set_person
105
+    @person = Person.find(params[:id])
106
+  end
107 107
 
108
-    # Set person from calendar token
109
-    def set_person_from_token
110
-      @person = Person.find_by(calendar_token: params[:calendar_token])
111
-    end
108
+  # Set person from calendar token
109
+  def set_person_from_token
110
+    @person = Person.find_by(calendar_token: params[:calendar_token])
111
+  end
112 112
 
113
-    # Never trust parameters from the scary internet, only allow the white list through.
114
-    def person_params
115
-      params.require(:person).permit(:first_name, :infix, :last_name, :email, :birth_date, :is_admin)
116
-    end
113
+  # Never trust parameters from the scary internet, only allow the white list through.
114
+  def person_params
115
+    params.require(:person).permit(:first_name, :infix, :last_name, :email, :birth_date, :is_admin)
116
+  end
117 117
 end

+ 2 - 2
app/helpers/authentication_helper.rb

@@ -86,10 +86,10 @@ module AuthenticationHelper
86 86
           return true
87 87
         end
88 88
 
89
-      return false
89
+        return false
90 90
       end
91 91
 
92
-    return false
92
+      return false
93 93
     end
94 94
   end
95 95