I am using can can gem to restriction user based on role
there is no model for product
class ProductsController < ApplicationController
authorize_resource :class => false
def index
@customers=Customer.all
end
end
in ability.rb
when i write like this can can allow me to acess the product controller
can [:index], :product
but when i write like this
can [:index], :products
it doesnot allow me to acess the product controller
my doubt is the controller name is products but in ability why we need to write product
and it's possibility to write plural in ability.rb ?
Thanks in advance