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

with_permissions_to not working in rails 4.1.6 #199

Open
fseefried opened this issue Oct 1, 2014 · 3 comments
Open

with_permissions_to not working in rails 4.1.6 #199

fseefried opened this issue Oct 1, 2014 · 3 comments

Comments

@fseefried
Copy link

Is this a defect or a configuration issue? Please help.

tickets=Ticket.with_permissions_to(:read)

breaks with:

undefined local variable or method `scoped' for #Class:0x5a207c0

Trace:

activerecord (4.1.6) lib/active_record/dynamic_matchers.rb:26:in method_missing' declarative_authorization (0.5.7) lib/declarative_authorization/in_model.rb:108:inwith_permissions_to'
app/controllers/tickets_controller.rb:8:in index' actionpack (4.1.6) lib/action_controller/metal/implicit_render.rb:4:insend_action'
actionpack (4.1.6) lib/abstract_controller/base.rb:189:in process_action' actionpack (4.1.6) lib/action_controller/metal/rendering.rb:10:inprocess_action'
actionpack (4.1.6) lib/abstract_controller/callbacks.rb:20:in block in process_action' activesupport (4.1.6) lib/active_support/callbacks.rb:113:incall'

@fseefried
Copy link
Author

Ok, found out that Model.scoped is depricated in rails 4. But you make it work if you use gem 'activerecord-deprecated_finders'.

Is somebody able to patch this?

@m1foley m1foley mentioned this issue Dec 3, 2014
@klyonrad
Copy link

So ehm... the pull request is merged into master. Is this issue closed or open?

@jphager2
Copy link

jphager2 commented Feb 7, 2018

Merged, but as far as I can see not released. There hasn't been a release in many years.

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

No branches or pull requests

3 participants