On 3 May 2014 03:27, tamouse pontiki <[email protected]> wrote: > On Fri, May 2, 2014 at 12:59 PM, Alfredo Barrero <[email protected]> wrote: >> Yes, when the 'current_user' is nil 'home_path' calls a method from session >> controller. I understand the reason of the loop, but I don“t know how to fix >> it :( >> >> I need this way because when the user is not loged he can't access anything >> from the application. > > Remove one or the other, your choice. If your application cannot > handle anonymous users (which is legit thing), don't send anonymous > users back to the home controller from the point where they have to > log in. What you should most likely be doing is directing them to a > login screen instead.
Or use :only or :except on the filter to specify that certain methods do/do not have to have authorisation. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLsCkMKbZai%2BX8kKET1mb3jLyORyCbh5U86LF8ZXV8WtQA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

