I get the following error:
undefined method `can_read?' for nil:NilClass
..when trying to access a product page with a logged-out user. At the moment I have
class ProductAuthorizer < ApplicationAuthorizer
def self.readable_by?(user)
true
end
end
I'd like to allow even non-logged in users to see the page. Is this possible?
I tried changing the default user method to:
config.user_method = :current_user ||= User.new
However, this causes problems, and my server won't even start.
Ok I found this at https://github.com/nathanl/authority/pull/32:
Hi I've just put this
...