how to stay on page after login ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

how to stay on page after login ?

eben sinaga
Hi,

I have one questions, how to stay on page after login ? should i create session url or something else ?

Cheers

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/de87baad-9125-48f8-9abd-8031b133e20c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to stay on page after login ?

Robby O'Connor
If you use something like devise.. it's more or less done for you.

On Jul 9, 2017 3:03 AM, "eben sinaga" <[hidden email]> wrote:
Hi,

I have one questions, how to stay on page after login ? should i create session url or something else ?

Cheers

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/de87baad-9125-48f8-9abd-8031b133e20c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAPncwv%2BnQB-cgRmw1mAXANBinqjg1z5yzTt%2B%3DopNtH%2Bt4wj5dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to stay on page after login ?

eben sinaga
I don't use devise

On Sunday, 9 July 2017 14:08:08 UTC+7, Robert O'Connor wrote:
If you use something like devise.. it's more or less done for you.

On Jul 9, 2017 3:03 AM, "eben sinaga" <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="uTAxczPWCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">ebenpe...@...> wrote:
Hi,

I have one questions, how to stay on page after login ? should i create session url or something else ?

Cheers

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="uTAxczPWCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonrails-ta...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="uTAxczPWCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonra...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/rubyonrails-talk/de87baad-9125-48f8-9abd-8031b133e20c%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/de87baad-9125-48f8-9abd-8031b133e20c%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/de87baad-9125-48f8-9abd-8031b133e20c%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/rubyonrails-talk/de87baad-9125-48f8-9abd-8031b133e20c%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/6e81c04d-1d2d-4051-aea3-4595e46d752a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to stay on page after login ?

Walter Lee Davis
The way Devise does this (in broad terms) is that on any page where you check for authentication (before_action :authenticate_user!) that method first checks to see if you are already signed in, if not, it stores the location of the page where you are in a cookie, then redirects you to the new session path, if you are successful in authenticating, then the session create method removes your original destination from the cookie, and redirects you there.

Walter

> On Jul 9, 2017, at 5:59 AM, eben sinaga <[hidden email]> wrote:
>
> I don't use devise
>
> On Sunday, 9 July 2017 14:08:08 UTC+7, Robert O'Connor wrote:
> If you use something like devise.. it's more or less done for you.
>
> On Jul 9, 2017 3:03 AM, "eben sinaga" <[hidden email]> wrote:
> Hi,
>
> I have one questions, how to stay on page after login ? should i create session url or something else ?
>
> Cheers
>
> --
> 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 [hidden email].
> To post to this group, send email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/de87baad-9125-48f8-9abd-8031b133e20c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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 [hidden email].
> To post to this group, send email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/6e81c04d-1d2d-4051-aea3-4595e46d752a%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/C3540F09-9533-46C8-9194-186E94F6027F%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.
Loading...