lib/action_controller/authentic_application.rb in muck-users-0.2.22 vs lib/action_controller/authentic_application.rb in muck-users-0.2.23

- old
+ new

@@ -188,14 +188,19 @@ def store_location if request.format == :html session[:return_to] = request.request_uri end end - + def store_referer session[:refer_to] = request.env["HTTP_REFERER"] end + # Set the return to to a specified url + def set_return_to(url) + session[:return_to] = url + end + # Redirect to the URI stored by the most recent store_location call or # to the passed default. def redirect_back_or_default(default) redirect_to(session[:return_to] || default) session[:return_to] = nil \ No newline at end of file