stffn / declarative_authorization

An unmaintained authorization plugin for Rails. Please fork to support current versions of Rails
MIT License
1.24k stars 231 forks source link

with_permissions_to not working in rails 4.1.6 #199

Open fseefried opened 10 years ago

fseefried commented 10 years ago

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 commented 10 years ago

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?

klyonrad commented 8 years ago

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

jphager2 commented 6 years ago

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