cancan icon indicating copy to clipboard operation
cancan copied to clipboard

Merge pull request #800 from wopata/master breaks shallow routes.

Open ramaboo opened this issue 11 years ago • 2 comments

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.

ramaboo avatar May 07 '13 00:05 ramaboo

:+1: Had to revert to 1.6.9.

Possibly due to AREL now instead of meta-where?

bryanrite avatar May 08 '13 19:05 bryanrite

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!

xhoy avatar Jul 01 '14 07:07 xhoy