Skip to content
This repository has been archived by the owner on Aug 17, 2017. It is now read-only.

No exception raised for forbidden attributes. #247

Open
bigtunacan opened this issue Mar 17, 2017 · 0 comments
Open

No exception raised for forbidden attributes. #247

bigtunacan opened this issue Mar 17, 2017 · 0 comments

Comments

@bigtunacan
Copy link

I'm not getting any exceptions raised for forbidden attributes and mass assignment is still allowed.

I have done the following

  1. Added the strong_parameters gem
  2. Created initializers/strong_parameters.rb

ActiveRecord::Base.class_eval do include ActiveModel::ForbiddenAttributesProtection end

  1. Added config.action_controller.action_on_unpermitted_parameters = :raise for all environments.
  2. Removed all attr_accessible calls from models
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant