require_relative 'active_record_extension'
require_relative 'action_view_extension'
require 'rails'

module Collate
  class Engine < ::Rails::Engine

    isolate_namespace Collate

    ActiveSupport.on_load :action_view do
      include Collate::ActionViewExtension
    end

    ActiveSupport.on_load :active_record do
      extend Collate::ActiveRecordExtension
    end

    ActionController::Base.prepend_view_path File.dirname(__FILE__) + "/../app/views"
  end
end
require_relative 'active_record_extension'
require_relative 'action_view_extension'
require 'rails'

module Collate
  class Engine < ::Rails::Engine

    isolate_namespace Collate

    ActiveSupport.on_load :action_view do
      include Collate::ActionViewExtension
    end

    ActiveSupport.on_load :active_record do
      extend Collate::ActiveRecordExtension
    end

    if defined? ActionController::Base
      ActionController::Base.prepend_view_path File.dirname(__FILE__) + "/../app/views"
    end
  end
end
Check if constant is initialized (won’t be in the tests so far).
Check if constant is initialized (won’t be in the tests so far).
