Sha256: cd62d9adc7937509b775f4a082f1ce022fe8692dad06510fdba0fc4414e6c266

Contents?: true

Size: 976 Bytes

Versions: 4

Compression:

Stored size: 976 Bytes

Contents

require 'fastly-rails/active_record/surrogate_key'
require 'fastly-rails/mongoid/surrogate_key'
require 'fastly-rails/action_controller/cache_control_headers'
require 'fastly-rails/action_controller/surrogate_control_headers'

module FastlyRails
  class Engine < ::Rails::Engine
    isolate_namespace FastlyRails

    config.generators do |g|
      g.test_framework      :mini_test, :spec => true, :fixture => false
      g.fixture_replacement :factory_girl, :dir => 'test/factories'
    end

    ActiveSupport.on_load :action_controller do
      ActionController::Base.send :include, FastlyRails::CacheControlHeaders
      ActionController::Base.send :include, FastlyRails::SurrogateControlHeaders
    end

    ActiveSupport.on_load :active_record do
      ::ActiveRecord::Base.send :include, FastlyRails::ActiveRecord::SurrogateKey
    end

    ActiveSupport.on_load :mongoid do
      ::Mongoid::Document.send :include, FastlyRails::Mongoid::SurrogateKey
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fastly-rails-0.1.5 lib/fastly-rails/engine.rb
fastly-rails-0.1.4 lib/fastly-rails/engine.rb
fastly-rails-0.1.3 lib/fastly-rails/engine.rb
fastly-rails-0.1.2 lib/fastly-rails/engine.rb