-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove attr_accessible
for Rails 4 compatibility.
#62
base: master
Are you sure you want to change the base?
Conversation
Using this with Rails 4 raises an error on `attr_accessible` as it is removed, in favour of `strong_params`. The onus is now on the implementer to only permit `name` and `redirect_uri` when creating an authorization.
This fixes the issue for me as well. Thanks! |
We did work to make this work on ActiveRecord 4.0 a while ago, and the build is passing. Do you have a test case that fails? |
You can demonstrate the problem by spinning up a bare rails app with a single model and including the ResourceOwner module. You can see this gist for a complete recreation script: https://gist.github.com/danielevans/7107532 |
FYI: The exact error given is .rvm/gems/ruby-1.9.3-p448@auth/gems/activemodel-4.0.0/lib/active_model/deprecated_mass_assignment_security.rb:17:in `attr_accessible': `attr_accessible` is extracted out of Rails into a gem. Please use new recommended protection model for params(strong_parameters) or add `protected_attributes` to your Gemfile to use old one. (RuntimeError)
from /Users/xxxxx/.rvm/gems/ruby-1.9.3-p448@xxxxx/gems/songkick-oauth2-provider-0.10.2/lib/songkick/oauth2/model/client.rb:18:in `<class:Client>' |
+1 |
Any reason this isn't merged yet? I can also confirm it's an issue with Rails 4. |
Any update? |
I have the same problem, any update? |
+1 |
+1. Any updates? |
+1 |
👍 any ETA as to when this will be merged? |
Using this with Rails 4 raises an error on
attr_accessible
as it isremoved, in favour of
strong_params
.The onus is now on the implementer to only permit
name
andredirect_uri
when creating an authorization.