lundi 15 juin 2015

CanCan explaination of load_and_authorize_resource

i would know how the load_and_authorize_resource works inside. I searched the github page Link and tried to undestand , but i didn't find nothing usefull. I only understand that load_and_authorize_resource is like a before_filter and it loads (in some way) the ability that we have written in ability.rb

i would know better how this is possible. I mean, i don't want to study ALL the gem, but i want just to see how cancan load the ability of a resource in a controller and if the load_and_authorize_resource is really a sort of before_filter.

I hope i explain my question well. Thank all.

Aucun commentaire:

Enregistrer un commentaire