File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
controllers/better_together
models/concerns/better_together Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33module 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
131133end
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments