However, I have some controllers that I don’t even want authenticated.
And as I understand it, expect only takes actions as parameters. How
can I exclude based on controllers?
I’m starting to think my authentication model isn’t very flexible.
It’s roles and rights recipe from the prag prog rails recipies book.
Maybe I should move my authentication before_filter check to only the
controllers I want to guard with authentication, instead of in the
application controller…
Maybe I should move my authentication before_filter check to only the
controllers I want to guard with authentication, instead of in the
application controller…
Yes… or if you have many controllers that need to be authenticated do
this:
class AuthenticatedController < ApplicationController
before_filter…
end
Then for those controllers do:
class MyAuthenticatedController < AuthenticatedController.
…
end