Module: RTeX::Framework::Rails

Defined in:
lib/rtex/framework/rails.rb

Overview

:nodoc:

Defined Under Namespace

Modules: ControllerMethods, HelperMethods Classes: TemplateHandler

Class Method Summary collapse

Class Method Details

.setupObject


7
8
9
10
11
12
13
14
15
16
# File 'lib/rtex/framework/rails.rb', line 7

def self.setup
  RTeX::Document.options[:tempdir] = File.expand_path(File.join(RAILS_ROOT, 'tmp'))
  if ActionView::Base.respond_to?(:register_template_handler)
    ActionView::Base.register_template_handler(:rtex, TemplateHandler)
  else
    ActionView::Template.register_template_handler(:rtex, TemplateHandler)
  end
  ActionController::Base.send(:include, ControllerMethods)
  ActionView::Base.send(:include, HelperMethods)
end