For my application, I use redirect_to :back
and it does the trick. However, I doubt this might have an error in a non general use case(s) (user came from a special page?) but i haven’t found it so far in my app.
Related Contents:
- Rails Routing (root :to => …)
- How to get a random number in Ruby
- Rails update_attributes without save?
- How to run a single RSpec test?
- How to replace a hash key with another key
- ActiveRecord: size vs count
- What is the right way to override a setter method in Ruby on Rails?
- Ruby on Rails Callback, what is difference between :before_save and :before_create?
- do..end vs curly braces for blocks in Ruby
- Rails 3 datatypes?
- Rails: Open link in new tab (with ‘link_to’)
- Deleting all records in a database table
- Pass a variable into a partial, rails 3?
- How do I run a Ruby file in a Rails environment?
- How do I strip non alphanumeric characters from a string and keep spaces?
- I need to generate uuid for my rails application. What are the options(gems) I have? [duplicate]
- Change the name of the :id parameter in Routing resources for Rails
- how to safely replace all whitespaces with underscores with ruby?
- Rails – Best-Practice: How to create dependent has_one relations
- Embedding JSON Data into YAML file
- unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055)
- Parsing string to add to URL-encoded URL
- How to change hash keys from `Symbol`s to `String`s?
- Connecting Rails 3.1 with Multiple Databases
- Rails validation required numericality even though presence is not set to true
- Ruby syntax: break out from ‘each.. do..’ block
- How can I replace a hash key with another key?
- :as in rails routes.rb
- Using send_file to download a file from Amazon S3?
- Rails, How to render a view/partial in a model
- Ruby rails – select only few columns from the database
- If I have a hash in Ruby on Rails, is there a way to make it indifferent access?
- STI, one controller
- What does do in rails erb?
- Rails: How to use dependent: :destroy in rails?
- How to define action with simple form for?
- Rails – How do I check developer mode or production mode in code
- Run Rails commands outside of console
- Ruby on Rails “invalid byte sequence in UTF-8” due to bot
- ruby on rails how to deal with NaN
- How to test rendering a partial with RSpec
- Ruby on Rails 3 howto make ‘OR’ condition
- How to update a single attribute without touching the updated_at attribute?
- Could not find rails (>= 0) amongst [] (Gem::LoadError)
- Adding foreign key to a rails model
- “rake assets:precompile” gives punc error
- How to call ApplicationController methods from ApplicationHelper
- How to change the default path of view files in a Rails 3 controller?
- How to generate a random date in Ruby?
- Rails.cache error in Rails 3.1 – TypeError: can’t dump hash with default proc