Sha256: dcba73c2dc125d877d8a3b9b87c555e1866edb0199f0fb830b7382caf485b5d8

Contents?: true

Size: 539 Bytes

Versions: 14

Compression:

Stored size: 539 Bytes

Contents

# frozen_string_literal: true
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

14 entries across 14 versions & 1 rubygems

Version Path
rspeckled-0.0.30 lib/rspeckled/plugins/rails/strong_parameters.rb
rspeckled-0.0.29 lib/rspeckled/plugins/rails/strong_parameters.rb
rspeckled-0.0.28 lib/rspeckled/plugins/rails/strong_parameters.rb
rspeckled-0.0.27 lib/rspeckled/plugins/rails/strong_parameters.rb
rspeckled-0.0.26 lib/rspeckled/plugins/rails/strong_parameters.rb
rspeckled-0.0.25 lib/rspeckled/plugins/rails/strong_parameters.rb
rspeckled-0.0.24 lib/rspeckled/plugins/rails/strong_parameters.rb
rspeckled-0.0.23 lib/rspeckled/plugins/rails/strong_parameters.rb
rspeckled-0.0.22 lib/rspeckled/plugins/rails/strong_parameters.rb
rspeckled-0.0.21 lib/rspeckled/plugins/rails/strong_parameters.rb
rspeckled-0.0.20 lib/rspeckled/plugins/rails/strong_parameters.rb
rspeckled-0.0.19 lib/rspeckled/plugins/rails/strong_parameters.rb
rspeckled-0.0.18 lib/rspeckled/plugins/rails/strong_parameters.rb
rspeckled-0.0.17 lib/rspeckled/plugins/rails/strong_parameters.rb