The README_LOGIN file says I need to call store_location in order to have the user brought back to the action they were on before they logged in. Why doesn''t before_filter :login_required do this automatically? Thanks, Carl Youngblood
It does. If you try to go to a page that requires authentication and you''re not logged in, you are redirected to the login page. Once you login, you are sent straight back to the page that you had originally requested. Robert On Apr 27, 2005, at 1:15 PM, Carl Youngblood wrote:> The README_LOGIN file says I need to call store_location in order to > have the user brought back to the action they were on before they > logged in. Why doesn''t before_filter :login_required do this > automatically? > > Thanks, > > Carl Youngblood > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Thanks. For some reason I am getting sent to the welcome page instead of the action I put in the URL. On 4/27/05, Robert Bousquet <bousquet-DG7SOAwx7rg@public.gmane.org> wrote:> It does. If you try to go to a page that requires authentication and > you''re not logged in, you are redirected to the login page. Once you > login, you are sent straight back to the page that you had originally > requested. > > Robert > > > On Apr 27, 2005, at 1:15 PM, Carl Youngblood wrote: > > > The README_LOGIN file says I need to call store_location in order to > > have the user brought back to the action they were on before they > > logged in. Why doesn''t before_filter :login_required do this > > automatically? > > > > Thanks, > > > > Carl Youngblood > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- "Nothing will ever be attempted, if all possible objections must first be overcome." - Samuel Johnson
FYI, I figured out what was wrong with my login. I had modified the login page to do a javascript-based challenge-response mechanism and without realizing it was submitting the login form twice. The second time around the return-to uri in the session was getting lost, so redirect_back_or_default was not working. On 4/27/05, Carl Youngblood <carlwork-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thanks. For some reason I am getting sent to the welcome page instead > of the action I put in the URL. > > On 4/27/05, Robert Bousquet <bousquet-DG7SOAwx7rg@public.gmane.org> wrote: > > It does. If you try to go to a page that requires authentication and > > you''re not logged in, you are redirected to the login page. Once you > > login, you are sent straight back to the page that you had originally > > requested. > > > > Robert > > > > > > On Apr 27, 2005, at 1:15 PM, Carl Youngblood wrote: > > > > > The README_LOGIN file says I need to call store_location in order to > > > have the user brought back to the action they were on before they > > > logged in. Why doesn''t before_filter :login_required do this > > > automatically? > > > > > > Thanks, > > > > > > Carl Youngblood > > > _______________________________________________ > > > Rails mailing list > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > -- > "Nothing will ever be attempted, if all possible objections must first > be overcome." > - Samuel Johnson >-- "Nothing will ever be attempted, if all possible objections must first be overcome." - Samuel Johnson