Module: Pagelime::Rails::ClassMethods

Included in:
Pagelime::Rails
Defined in:
lib/pagelime/rails.rb

Instance Method Summary collapse

Instance Method Details

#configure_pagelime!Object



19
20
21
22
23
24
25
26
# File 'lib/pagelime/rails.rb', line 19

def configure_pagelime!
  ::Pagelime.configure do |config|
    config.toggle_processing    = "per_request"
    config.logger               = ::Rails.logger
    config.cache                = ::Rails.cache
    config.cache_fetch_options  = { :expires_in => 1.year }
  end
end

#initialize!Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/pagelime/rails.rb', line 4

def initialize!
  
  ::Rails.logger.debug "PAGELIME CMS RAILS PLUGIN: initializing plugin"
  
  # wire controller extensions
  require_relative 'rails/controller_extensions'
  ActionController::Base.extend ControllerExtensions
  
  # wire helper
  require_relative 'rails/view_helper'
  ActionView::Base.send :include, ViewHelper
  
  configure_pagelime!
end