Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

felixclack
Copy link

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.

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.
@danielevans
Copy link

This fixes the issue for me as well. Thanks!

@jcoglan
Copy link
Contributor

jcoglan commented Oct 22, 2013

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?

@danielevans
Copy link

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

@nicosuria
Copy link

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>'

@myitcv
Copy link

myitcv commented Nov 15, 2013

+1

@andrewpbrett
Copy link

Any reason this isn't merged yet? I can also confirm it's an issue with Rails 4.

@myitcv
Copy link

myitcv commented Jan 3, 2014

Any update?

@davidpiegza
Copy link

I have the same problem, any update?

@kritik
Copy link

kritik commented Mar 21, 2014

+1

@jbye
Copy link

jbye commented Apr 1, 2014

+1. Any updates?

@d-natoli
Copy link

+1

@jgrevich
Copy link

👍 any ETA as to when this will be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.