Greg Hauptmann
2006-Oct-16 23:30 UTC
javascript:history.back() - is there a rails equivalent to this?
Hi all
Re
<a href = "javascript:history.back()"> Go back </a>
Is there a rails equivalent to this?
Thanks
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---
Matt Pelletier
2006-Oct-16 23:48 UTC
Re: javascript:history.back() - is there a rails equivalent to this?
On 10/16/06, Greg Hauptmann <greg.hauptmann.ruby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi all > > Re > > <a href = "javascript:history.back()"> Go back </a> > > Is there a rails equivalent to this?Do you mean something like this? <%= link_to_function ''Go back'', ''history.back()'' %> Matt Thanks> > > > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
_Kevin
2006-Oct-17 01:42 UTC
Re: javascript:history.back() - is there a rails equivalent to this?
On Oct 16, 7:48 pm, "Matt Pelletier" <eastmedia...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 10/16/06, Greg Hauptmann <greg.hauptmann.r...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hi all > > > Re > > > <a href = "javascript:history.back()"> Go back </a> > > > Is there a rails equivalent to this?Do you mean something like this? > > <%= link_to_function ''Go back'', ''history.back()'' %> > > Matt > > Thanks > >There is also ''redirect_to :back'', but I think that is entirely server side. _Kevin --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Greg Hauptmann
2006-Oct-17 02:19 UTC
Re: javascript:history.back() - is there a rails equivalent to this?
I guess so - or whether something like the following exists I guess:
<%= link_back ''Go back'' %>
On 10/17/06, _Kevin
<kevin.olbrich-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
>
>
>
> On Oct 16, 7:48 pm, "Matt Pelletier"
<eastmedia...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > On 10/16/06, Greg Hauptmann
<greg.hauptmann.r...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >
> >
> >
> > > Hi all
> >
> > > Re
> >
> > > <a href = "javascript:history.back()"> Go
back </a>
> >
> > > Is there a rails equivalent to this?Do you mean something like
this?
> >
> > <%= link_to_function ''Go back'',
''history.back()'' %>
> >
> > Matt
> >
> > Thanks
> >
> >
>
> There is also ''redirect_to :back'', but I think that is
entirely server
> side.
>
> _Kevin
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---
Daniel N
2006-Oct-17 02:28 UTC
Re: javascript:history.back() - is there a rails equivalent to this?
On 10/17/06, Greg Hauptmann <greg.hauptmann.ruby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I guess so - or whether something like the following exists I guess: > > <%= link_back ''Go back'' %>If you want a function like this available in your view then include it in the application_helper.rb file. I think this will work. I''m at work so no rails to check this with :( def link_back( text, *args ) link_to_function ''Go back'', ''history.back()'', args end Then use your link_back function in your views. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Greg Hauptmann
2006-Oct-17 10:31 UTC
Re: javascript:history.back() - is there a rails equivalent to this?
good idea - thanks --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---