I have a Deals controller and I have an action called popular. I have added the popular to the routes (as a collection, if it's worth the info) and I want everybody to be able to acess that page.
I'm using CanCan and I have this:
class Ability
include CanCan::Ability
def initialize(user)
user ||= User.new
alias_action [:index, :show, :search, :recent, :popular], :to => :coolread
can :read, :all
can :coolread, :all
#more stuff here but anyway
end
end
The problem is that I get a CanCan::AcessDenied exception and I have no idea why. Can someone help me?
Thanks,
Nicolás Hock Isaza