You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.
As far as I understand we don't need parent object with shallow option/route in show/update/destroy actions. But these lines will load it everytime (parent object). So when I call ChildsController#show with id = 1 it always looks for params[:parent_id] and fails to find it (so action doesn't execute further).
Is there a way to avoid looking for parent objects with shallow option without explicit declaration :except => [:show, :update, :destroy] for parent object?
Thank you for your job!
The text was updated successfully, but these errors were encountered:
Hello.
I've simple controller
class ChildsController < ApplicationController
load_and_authorize_resource :parent
load_and_authorize_resource :child, :through => :parent, :shallow => true
As far as I understand we don't need parent object with shallow option/route in show/update/destroy actions. But these lines will load it everytime (parent object). So when I call ChildsController#show with id = 1 it always looks for params[:parent_id] and fails to find it (so action doesn't execute further).
Is there a way to avoid looking for parent objects with shallow option without explicit declaration :except => [:show, :update, :destroy] for parent object?
Thank you for your job!
The text was updated successfully, but these errors were encountered: