Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Question: How to load through parent of nested #1045

Open
mberrueta opened this issue Nov 25, 2016 · 1 comment
Open

Question: How to load through parent of nested #1045

mberrueta opened this issue Nov 25, 2016 · 1 comment

Comments

@mberrueta
Copy link

mberrueta commented Nov 25, 2016

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

@davidakachaos
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants