Fixed connect_to_model filter extension in wiki_controller (using inheritance here was daft); accelerated tests somewhat

This commit is contained in:
Alexey Verkhovsky 2006-03-24 07:53:20 +00:00
parent 64313ca208
commit 5f3cf38851
5 changed files with 9 additions and 14 deletions

View file

@ -2,7 +2,7 @@
# Likewise will all the methods added be available for all controllers.
class ApplicationController < ActionController::Base
before_filter :fetch_model_data, :check_authorization, :setup_url_generator, :set_content_type_header, :set_robots_metatag
before_filter :connect_to_model, :check_authorization, :setup_url_generator, :set_content_type_header, :set_robots_metatag
after_filter :remember_location, :teardown_url_generator
# For injecting a different wiki model implementation. Intended for use in tests
@ -27,7 +27,7 @@ class ApplicationController < ActionController::Base
end
end
def fetch_model_data
def connect_to_model
@action_name = @params['action'] || 'index'
@web_name = @params['web']
@wiki = wiki