Hello,
There is an link_to option or an helper that generate a link like :
Thanks
you can use link_to “Back”, “javascript:histroy.back()”
oo00oo wrote:
Hello,
There is an link_to option or an helper that generate a link like :
<%= link_to_function ‘Back’, ‘history.back()’ %>
Should do the trick…
Ok thanks, so no helper or option like :back => true
oo00oo wrote:
Ok thanks, so no helper or option like :back => true
Or you can add this to your ApplicationHelper.rb
def link_back
return link_to_function ‘Back’, ‘history.back()’
end
Then in your views:
<%= link_to_back %>
Guest wrote:
oo00oo wrote:
Ok thanks, so no helper or option like :back => true
Or you can add this to your ApplicationHelper.rb
def link_back
return link_to_function ‘Back’, ‘history.back()’
endThen in your views:
<%= link_to_back %>
You can also use ‘redirect_to :back’ which will send you back to the
referring page… not quite the same thing.
_Kevin
Guest wrote:
oo00oo wrote:
Ok thanks, so no helper or option like :back => true
Or you can add this to your ApplicationHelper.rb
def link_back
return link_to_function ‘Back’, ‘history.back()’
endThen in your views:
<%= link_to_back %>
you mean
<%= link_back %>
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs