We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b22f5e commit 7f9a2d9Copy full SHA for 7f9a2d9
app/controllers/better_together/platform_invitations_controller.rb
@@ -125,8 +125,8 @@ def param_invitation_class
125
param_type = params[:platform_invitation][:type]
126
127
Rails.application.eager_load! if Rails.env.development? # Ensure all models are loaded
128
- valid_types = [BetterTogether::PlatformInvitation, *BetterTogether::PlatformInvitation.descendants].map(&:to_s)
129
- param_type.constantize if valid_types.include?(param_type)
+ valid_types = [BetterTogether::PlatformInvitation, *BetterTogether::PlatformInvitation.descendants]
+ valid_types.find { |klass| klass.to_s === param_type }
130
end
131
132
# rubocop:enable Metrics/ClassLength
0 commit comments