Sha256: 23cc8ed3669113c5d880cae11aff3865b537a2615e3a3cbb3d8aead6e242d91d

Contents?: true

Size: 739 Bytes

Versions: 21

Compression:

Stored size: 739 Bytes

Contents

module Impressionist
  class Engine < ::Rails::Engine
    attr_accessor :orm

  initializer 'impressionist.model' do |app|
    @orm = Impressionist.orm
    include_orm
  end


  initializer 'impressionist.controller' do
    require "impressionist/controllers/mongoid/impressionist_controller.rb" if orm == :mongoid.to_s

    ActiveSupport.on_load(:action_controller) do
     include ImpressionistController::InstanceMethods
     extend ImpressionistController::ClassMethods
   end
  end


 private

    def include_orm
      require "#{root}/app/models/impressionist/impressionable.rb"
      require "impressionist/models/#{orm}/impression.rb"
      require "impressionist/models/#{orm}/impressionist/impressionable.rb"
    end

  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
impressionist-2.0.0 lib/impressionist/engine.rb
impressionist-1.6.1 lib/impressionist/engine.rb
impressionist-1.6.0 lib/impressionist/engine.rb
impressionist-1.5.2 lib/impressionist/engine.rb
impressionist2-1.5.5 lib/impressionist/engine.rb
impressionist2-1.5.4 lib/impressionist/engine.rb
impressionist2-1.5.3 lib/impressionist/engine.rb
impressionist2-1.5.1 lib/impressionist/engine.rb
impressionist-1.5.1 lib/impressionist/engine.rb
impressionist-1.4.13 lib/impressionist/engine.rb
impressionist-1.4.12 lib/impressionist/engine.rb
impressionist-1.4.11 lib/impressionist/engine.rb
impressionist-1.4.10 lib/impressionist/engine.rb
impressionist-1.4.9 lib/impressionist/engine.rb
impressionist-1.4.8 lib/impressionist/engine.rb
impressionist-1.4.7 lib/impressionist/engine.rb
impressionist-1.4.6 lib/impressionist/engine.rb
impressionist-1.4.5 lib/impressionist/engine.rb
impressionist-1.4.4 lib/impressionist/engine.rb
impressionist-1.4.3 lib/impressionist/engine.rb