cancan and inherited_resources overwriting collection
-
12-11-2019 - |
Pergunta
I think I am running into a conflict with two of my favorite gems. Consider the following:
class AccountsController < InheritedResources::Base
load_and_authorize_resource
def collection
@accounts ||= end_of_association_chain.order_by(:name.asc).paginate(:page => params[:page],:per_page =>10)
end
end
It does not seem the CanCan calls the collection method. I feel that it should.
Is there a known work around? Am I doing something silly?
Thanks!
Nenhuma solução correta
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow