cancan icon indicating copy to clipboard operation
cancan copied to clipboard

load_resource polymorphic association not working on 1.6.10

Open ITPROz opened this issue 11 years ago • 2 comments

I have a comments controller with a a polymorphic association like this:

load_resource :project load_resource :upload load_and_authorize_resource :comment, :through => [:project, :upload]

This is supposed to load project or upload depend if they exist or not. With cancan 1.6.10, it's giving me an 'Couldn't find Project with id=' error. However it's working perfectly on 1.6.9.

Is this feature not available on the newer version or it needs a different implementation?

Thanks

ITPROz avatar Jun 12 '13 11:06 ITPROz

I just found the fix here: https://github.com/ryanb/cancan/pull/864

ITPROz avatar Jun 12 '13 11:06 ITPROz

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