Sha256: 28d5754efc01bbafd00d3503d34e7ec33fd4542769acb8b319330958a9be27c1

Contents?: true

Size: 524 Bytes

Versions: 9

Compression:

Stored size: 524 Bytes

Contents

if Object.const_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

9 entries across 9 versions & 1 rubygems

Version Path
rspectacular-0.70.0 lib/rspectacular/plugins/rails/strong_parameters.rb
rspectacular-0.69.0 lib/rspectacular/plugins/rails/strong_parameters.rb
rspectacular-0.68.0 lib/rspectacular/plugins/rails/strong_parameters.rb
rspectacular-0.67.0 lib/rspectacular/plugins/rails/strong_parameters.rb
rspectacular-0.66.0 lib/rspectacular/plugins/rails/strong_parameters.rb
rspectacular-0.65.0 lib/rspectacular/plugins/rails/strong_parameters.rb
rspectacular-0.64.0 lib/rspectacular/plugins/rails/strong_parameters.rb
rspectacular-0.63.0 lib/rspectacular/plugins/rails/strong_parameters.rb
rspectacular-0.62.1 lib/rspectacular/plugins/rails/strong_parameters.rb