Is it possible to load a resource using a subdomain in CanCan?
The load_resource
and load_and_authorize_resource
methods are an alias to this:
def load
@foo = Resource.find(params[:id])
end
In my case, I need to load the resource based on a subdomain. Any idea how to achieve this?