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?
You can overwrite the load_resource to use the subdomain instead and than just call authorize_resource on it
Not sure how you code is structured, but something along this lines should work