cancan icon indicating copy to clipboard operation
cancan copied to clipboard

Question: How to load through parent of nested

Open mberrueta opened this issue 7 years ago • 1 comments

Hello all, I have a question that I can't find an example in the doc, loading nested of nested resource

I have

class A
  has_many B
  :project_id

class B
  has_one C

class C

then I have a controller

class CController
  load_and_authorize_resource :a
  load_and_authorize_resource :b, through: :a, shallow: true
  load_and_authorize_resource :c

I want something like c, through: :a, shallow: true

it's possible?

thanks in advance

mberrueta avatar Nov 25 '16 12:11 mberrueta

Thanks for reporting your issue. But cancan isn't being actively maintained, you should use CanCanCan

davidakachaos avatar Jan 31 '17 07:01 davidakachaos