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
i have some nested resources, and i check resource authorization with cancan.
in my ability.rb i need to check authorization on the parents rescource, so i set it in current_ability
this works fine, but it seams that on new or create actions the parent is set in IR.
any idea?
thanks a lot,
marco
The text was updated successfully, but these errors were encountered:
thanks for answering this quick.
your are right, the parent is set on all views, but its not available on all actions in the controller.
i've also just found that when i call association_chain, the parent is available corrrectly on all actions.
class BaseController < InheritedResources::Base
before_filter :trigger_parent_assignment
def trigger_parent_assignment
association_chain
end
end
i have some nested resources, and i check resource authorization with cancan.
in my ability.rb i need to check authorization on the parents rescource, so i set it in current_ability
this works fine, but it seams that on new or create actions the parent is set in IR.
any idea?
thanks a lot,
marco
The text was updated successfully, but these errors were encountered: