A simple question: how do I get the path or full URL of the current action, INCLUDING the query string?
I want to save it in a session variable as follows:
def show
@thingy = Thingy.find(params[:id])
session[:some_var] = current_url
...
end
Right now I'm doing the following, but it seems a bit heavy (especially for specifying the query string parameters separately):
def show
@thingy = Thingy.find(params[:id])
session[:some_var] = thingy_path(@thingy, :q1 => params[:q1], :q2 => params[:q2])
...
end
source
share