Sha256: 9dfa1de03e123db89b7349a97fc990b757221fe535f415994599e9864cc94c68

Contents?: true

Size: 511 Bytes

Versions: 4

Compression:

Stored size: 511 Bytes

Contents

if defined?('ActionController::Parameters')
  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
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rspectacular-0.70.4 lib/rspectacular/plugins/rails/strong_parameters.rb
rspectacular-0.70.3 lib/rspectacular/plugins/rails/strong_parameters.rb
rspectacular-0.70.2 lib/rspectacular/plugins/rails/strong_parameters.rb
rspectacular-0.70.1 lib/rspectacular/plugins/rails/strong_parameters.rb