[BREAK BUILD] Upgrade URL rewriting to Routes (there is one test case in routes_test.rb that fails, and it depends on some refactoring that I agreed upon with Ulysses)

This commit is contained in:
Alexey Verkhovsky 2005-02-15 22:41:58 +00:00
parent 9c04ed3461
commit 5e25a94e51
10 changed files with 93 additions and 234 deletions

View file

@ -1,12 +1,7 @@
require 'url_rewriting_hack'
# The filters added to this controller will be run for all controllers in the application.
# Likewise will all the methods added be available for all controllers.
class ApplicationController < ActionController::Base
# implements Instiki's legacy URLs
require 'url_rewriting_hack'
before_filter :set_utf8_http_header, :connect_to_model
after_filter :remember_location
@ -88,7 +83,7 @@ class ApplicationController < ActionController::Base
def remember_location
if @response.headers['Status'] == '200 OK'
unless @@REMEMBER_NOT.include? action_name or @request.method != :get
@session[:return_to] = url_for
@session[:return_to] = @request.request_uri
logger.debug("Session ##{session.object_id}: remembered URL '#{@session[:return_to]}'")
end
end