cancan
cancan copied to clipboard
Merge pull request #800 from wopata/master breaks shallow routes.
load_and_authorize_resource :dygest load_and_authorize_resource :issue, through: :dygest, shallow: true
works before pull request #800. After pull request #800 the same code returns an error: Couldn't find Dygest with id= when you visit a shallow route like /admin/issues/1/edit
The problem is line 132 of lib/cancan/controller_resource.rb which adds a .to_s call. I suspect this forcing of a string probably messes up some other check elsewhere in the system which does not expect a string to be returned when dealing with shallow routes. I don't know the cancan code base that well though so I have not investigated it further.
:+1: Had to revert to 1.6.9.
Possibly due to AREL now instead of meta-where?
Thanks for your submission! The ryanb/cancan repository has been inactive since Sep 06, 2013. Since only Ryan himself has commit permissions, the CanCan project is on a standstill.
CanCan has many open issues, including missing support for Rails 4. To keep CanCan alive, an active fork exists at cancancommunity/cancancan. The new gem is cancancan. More info is available at #994.
If your pull request or issue is still applicable, it would be really appreciated if you resubmit it to CanCanCan.
We hope to see you on the other side!