Initial import of the sources from SVN
This commit is contained in:
parent
e1a14bc27b
commit
223b2bec6c
204 changed files with 29431 additions and 0 deletions
27
app/controllers/application.rb
Normal file
27
app/controllers/application.rb
Normal file
|
@ -0,0 +1,27 @@
|
|||
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'
|
||||
|
||||
# For injecting a different wiki model implementation. Intended for use in tests
|
||||
def self.wiki=(the_wiki)
|
||||
# a global variable is used here because Rails reloads controller and model classes in the
|
||||
# development environment; therefore, storing it as a class variable does not work
|
||||
# class variable is, anyway, not much different from a global variable
|
||||
$instiki_wiki_service = the_wiki
|
||||
logger.debug("Wiki service: #{the_wiki.to_s}")
|
||||
end
|
||||
|
||||
def self.wiki
|
||||
$instiki_wiki_service
|
||||
end
|
||||
|
||||
def wiki
|
||||
$instiki_wiki_service
|
||||
end
|
||||
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue