Skip to content

Commit 874426e

Browse files
committed
Rubocop fixes
1 parent e61e54c commit 874426e

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

app/controllers/better_together/events_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def index
1818

1919
protected
2020

21-
def build_event_hosts
21+
def build_event_hosts # rubocop:disable Metrics/AbcSize
2222
return unless params[:host_id].present? && params[:host_type].present?
2323

2424
host_klass = params[:host_type].safe_constantize

app/policies/better_together/event_policy.rb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,14 @@ def event_host_member?
3535
# Filtering and sorting for calendars according to permissions and context
3636
class Scope < ApplicationPolicy::Scope
3737
def resolve
38-
scope.with_attached_cover_image.includes(:string_translations, :text_translations, :location, :event_hosts, categorizations: { category: %i[string_translations cover_image_attachment cover_image_blob] }).order(
39-
starts_at: :desc, created_at: :desc
40-
).where(permitted_query)
38+
scope.with_attached_cover_image
39+
.includes(:string_translations, :text_translations, :location, :event_hosts, categorizations: {
40+
category: %i[
41+
string_translations cover_image_attachment cover_image_blob
42+
]
43+
}).order(
44+
starts_at: :desc, created_at: :desc
45+
).where(permitted_query)
4146
end
4247

4348
protected

0 commit comments

Comments
 (0)