Skip to content

Commit 0b22f5e

Browse files
committed
Rubocop fixes
1 parent 830e705 commit 0b22f5e

File tree

22 files changed

+65
-35
lines changed

22 files changed

+65
-35
lines changed

app/controllers/better_together/calls_for_interest_controller.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
# frozen_string_literal: true
2+
13
module BetterTogether
4+
# CRUD for CallForInterest
25
class CallsForInterestController < FriendlyResourceController
3-
46
def index
57
@draft_calls_for_interest = @calls_for_interest.draft
68
@upcoming_calls_for_interest = @calls_for_interest.upcoming
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
# frozen_string_literal: true
2+
13
module BetterTogether
2-
module CallsForInterestHelper
4+
module CallsForInterestHelper # rubocop:todo Style/Documentation
35
end
46
end

app/models/better_together/call_for_interest.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
# frozen_string_literal: true
2+
13
module BetterTogether
4+
# Calls for interest allow communities to seek responses from parties interested in proposed initiatives
25
class CallForInterest < ApplicationRecord
36
self.table_name = :better_together_calls_for_interest
47

app/models/better_together/comment.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module BetterTogether
24
class Comment < ApplicationRecord
35
end

app/models/better_together/geography/map.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def title(options = {}, locale: I18n.locale)
7171

7272
return result unless mappable_id.present?
7373

74-
return mappable.to_s
74+
mappable.to_s
7575
end
7676

7777
def to_partial_path

app/models/better_together/navigation_item.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def set_position
176176
max_position ? max_position + 1 : 0
177177
end
178178

179-
def title(options = {}, locale: I18n.locale) # rubocop:todo Lint/UnusedMethodArgument
179+
def title(options = {}, locale: I18n.locale)
180180
return linkable.title(**options) if linkable.present? && linkable.respond_to?(:title)
181181

182182
super(**options, locale:)

app/policies/better_together/application_policy.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def initialize(user, scope)
4747
@scope = scope
4848
end
4949

50-
def resolve
50+
def resolve # rubocop:todo Metrics/AbcSize, Metrics/MethodLength
5151
result = scope.order(created_at: :desc)
5252

5353
table = scope.arel_table
@@ -81,7 +81,6 @@ def resolve
8181
result = result.where(query)
8282
end
8383

84-
8584
result
8685
end
8786

app/policies/better_together/calendar_policy.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ def create?
2121

2222
# Filtering and sorting for calendars according to permissions and context
2323
class Scope < ApplicationPolicy::Scope
24-
def resolve
25-
super
26-
end
2724
end
2825
end
2926
end

app/policies/better_together/geography/community_collection_map_policy.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
module BetterTogether
44
module Geography
5-
class CommunityCollectionMapPolicy < MapPolicy # rubocop:todo Style/Documentation
6-
7-
class Scope < Scope # rubocop:todo Style/Documentation
8-
5+
class CommunityCollectionMapPolicy < MapPolicy
6+
class Scope < Scope
97
end
108
end
119
end

app/policies/better_together/geography/community_map_policy.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
module BetterTogether
44
module Geography
5-
class CommunityMapPolicy < MapPolicy # rubocop:todo Style/Documentation
6-
7-
class Scope < Scope # rubocop:todo Style/Documentation
8-
5+
class CommunityMapPolicy < MapPolicy
6+
class Scope < Scope
97
end
108
end
119
end

0 commit comments

Comments
 (0)