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