Rails 3.1 authentication

I have the rails 3.1 authentication set up, how do I get it to make sure
I
authenticate system wide?

Use before_filter in ApplicationController class?

On Mon, Sep 19, 2011 at 9:27 PM, Me [email protected] wrote:

I have the rails 3.1 authentication set up, how do I get it to make sure I
authenticate system wide?
If by system wide you mean every action on every controller you can
set up a before_filter on ApplicationController and check for the
current_user there.

Hope it helps.

Cheers.


Leonardo M…
There’s no place like ~

If you want everything controller to use Authentication then I would
suggest using a before_filter in the ApplicationController. Something
like this

class ApplicationController < ActionController::Base
before_filter: some_authentication_method
end

Regards
Robb

I am currently using the devise gem for authentication. It provides a
great base for authentication so that you don’t have to reinvent the
wheel.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs