Sha256: bdc8c4f6fc645a0b21a05118b26bb2e28195dcfd36fc187f2dbbee3184bf28f9

Contents?: true

Size: 489 Bytes

Versions: 2

Compression:

Stored size: 489 Bytes

Contents

# frozen_string_literal: true

always_permitted_parameters = %w{id}

if ::ActionController::Parameters.respond_to?(:always_permitted_parameters)
  ::ActionController::Parameters
    .always_permitted_parameters += always_permitted_parameters
else
  always_permitted_parameters.each do |always_permitted_parameter|
    ::ActionController::Parameters::NEVER_UNPERMITTED_PARAMS << always_permitted_parameter
  end
end

::ActionController::Parameters.action_on_unpermitted_parameters = :raise

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rspeckled-2.1.1 lib/rspeckled/plugins/extensions/strong_parameters.rb
rspeckled-2.1.0 lib/rspeckled/plugins/extensions/strong_parameters.rb