Method: Cms.init
- Defined in:
- lib/cms/init.rb
.init ⇒ Object
This is called after the environment is ready
22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/cms/init.rb', line 22 def init ActionController::Routing::RouteSet::Mapper.send :include, Cms::Routes ActiveSupport::Dependencies.load_paths += %W( #{RAILS_ROOT}/app/portlets ) ActiveSupport::Dependencies.load_paths += %W( #{RAILS_ROOT}/app/portlets/helpers ) ActionController::Base.append_view_path DynamicView.base_path ActionView::Base.default_form_builder = Cms::FormBuilder # This is jsut to be safe # dynamic views are stored in a tmp dir # so they could be blown away on a server restart or something # so this just makes sure they get written out DynamicView.write_all_to_disk! if DynamicView.table_exists? end |