Skip to content

Commit 9530077

Browse files
committed
Rubocop fixes
1 parent 48494ad commit 9530077

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/controllers/better_together/platform_invitations_controller.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# frozen_string_literal: true
22

33
module BetterTogether
4+
# rubocop:todo Metrics/ClassLength
45
class PlatformInvitationsController < ApplicationController # rubocop:todo Style/Documentation
56
before_action :set_platform
67
before_action :set_platform_invitation, only: %i[destroy resend]
@@ -124,8 +125,9 @@ def param_invitation_class
124125
param_type = params[:platform_invitation][:type]
125126

126127
Rails.application.eager_load! if Rails.env.development? # Ensure all models are loaded
127-
valid_types = [ BetterTogether::PlatformInvitation, *BetterTogether::PlatformInvitation.descendants ].map(&:to_s)
128-
invitation_type = param_type.constantize if valid_types.include?(param_type)
128+
valid_types = [BetterTogether::PlatformInvitation, *BetterTogether::PlatformInvitation.descendants].map(&:to_s)
129+
param_type.constantize if valid_types.include?(param_type)
129130
end
130131
end
132+
# rubocop:enable Metrics/ClassLength
131133
end

app/models/concerns/better_together/member.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,7 @@ def membership_class_for(record)
127127
def cache_key_for(method, identifier = nil, record = nil)
128128
base_key = "better_together/member/#{self.class.name}/#{id}/#{cache_version}/#{method}"
129129
key = identifier ? "#{base_key}/#{identifier}" : base_key
130-
key = record ? "#{key}/#{record.class.name}/#{record.identifier}" : key
131-
132-
key
130+
record ? "#{key}/#{record.class.name}/#{record.identifier}" : key
133131
end
134132
end
135133
end

0 commit comments

Comments
 (0)