Tony,

Thank you for the reply.

This, unfortunately, is not how my app works, although certain parts of 
the app may be adapted. Mainly, an unauthenticated user may view most 
paths, which doesn't mean he can view all the content. For example, we 
have news entries that show only for authenticated users, but also 
public news entries. The forum slice I'm writing works about the same 
principle: unauthenticated may view public forums, but not post; 
authenticated users may post in public; users with role "officer" can 
view and post in the officer forum, etc.

I've not had a close enough look at the auth slice's internals, but I'm 
hoping there could be an easy way to have /login always redirect to the 
referring url?

~Chris

Tony Mann escribió:
> Chris,
>
> Normally you would use "before :ensure_authenticated" in your 
> controller. When an action in the controller is called, if the user is 
> not logged in this forces the login screen to show up before the 
> action is performed.
>
> ..tony..
>
> On Mon, Oct 12, 2009 at 5:32 AM, Chris <[email protected] 
> <mailto:[email protected]>> wrote:
>
>     Hello,
>
>     Is there any quick (as in: no need to override code) way to have
>     the login action from merb-auth-slice-password redirect to
>     wherever the user was before (aka: referrer to /login)?
>
>
>
>
> >



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to