I have the rails 3.1 authentication set up, how do I get it to make sure I authenticate system wide? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/tviS_m2_1p4J. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 On Sep 20, 1:27 am, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have the rails 3.1 authentication set up, how do I get it to make sure I > authenticate system wide?-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Use before_filter in ApplicationController class? On 20 Wrz, 02:27, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have the rails 3.1 authentication set up, how do I get it to make sure I > authenticate system wide?-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Mon, Sep 19, 2011 at 9:27 PM, Me <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 Mateo. There''s no place like ~ -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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. On Sep 19, 5:27 pm, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have the rails 3.1 authentication set up, how do I get it to make sure I > authenticate system wide?-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.