Quantcast
Channel: 'Back' browser action in Ruby on Rails - Stack Overflow
Browsing all 11 articles
Browse latest View live

Answer by HarlemSquirrel for 'Back' browser action in Ruby on Rails

This is working in Rails 5.1 along with Turbolinks.link_to 'Back', 'javascript:history.back()'

View Article



Answer by Vlad Hilko for 'Back' browser action in Ruby on Rails

You can use js function window.history.back() = link_to 'Back', onclick: "window.history.back();"

View Article

Answer by Dan Andreasson for 'Back' browser action in Ruby on Rails

If you like me do not want the behaviour of link_to "cancel", :back you could implement a helper method which either links to the records index path or show path. (i.e teams_path or...

View Article

Answer by philler82 for 'Back' browser action in Ruby on Rails

Pay attention to this comment from the user rthbound! As he notes, link_to with the symbol :back does not always generate a “real” back event as if the user clicked on their browser’s Back button. It...

View Article

Answer by Pradeep Agrawal for 'Back' browser action in Ruby on Rails

This will work similarly as browser back button try this<%= link_to 'Back', 'javascript:history.go(-1);' %>

View Article


Answer by Jay Killeen for 'Back' browser action in Ruby on Rails

In Rails 4.2, I got it to work with this:<a href="javascript:history.back()">Refine Search</a>I stole this off of @cpm’s answer, except that link_to("Refine Search", :back) didn’t do the...

View Article

Answer by Mark A for 'Back' browser action in Ruby on Rails

Rails <= 4.0Usinglink_to_function "Back", "history.back()"seems to be exactly like hitting the back button in the browser. All inputted form data is still there when you get back.

View Article

Answer by cpm for 'Back' browser action in Ruby on Rails

You can use link_to("Hello", :back) to generate <a href="javascript:history.back()">Hello</a>.

View Article


Answer by Sophie Alpert for 'Back' browser action in Ruby on Rails

In Rails 3 and earlier:link_to_function "Back", "history.back()"In Rails 4, this method has been removed. See Andreas's comment.

View Article


Answer by Tilendor for 'Back' browser action in Ruby on Rails

Use<%= link_to 'Back', :back %>This is specificied in the RDoc hereThis generates some Javascript to navigate backward. I've just tested it, and it works.

View Article

'Back' browser action in Ruby on Rails

Can the 'Back' browser functionality be invoked from a Rails 'Back' link?

View Article
Browsing all 11 articles
Browse latest View live




Latest Images