Sha256: 1bebb762b127f5553582b06af6892d5073217efeb75f38329043f6106800a6cc

Contents?: true

Size: 804 Bytes

Versions: 13

Compression:

Stored size: 804 Bytes

Contents

module CarrierWave
  module Backgrounder
    class Railtie < Rails::Railtie

      initializer "carrierwave_backgrounder.active_record" do
        ActiveSupport.on_load :active_record do
          require 'backgrounder/orm/activemodel'
          ::ActiveRecord::Base.extend CarrierWave::Backgrounder::ORM::ActiveModel
        end
      end

      initializer "carrierwave_backgrounder.data_mapper", :before =>"data_mapper.add_to_prepare" do
        require 'backgrounder/orm/data_mapper' if defined?(DataMapper)
      end

      initializer "carrierwave_backgrounder.mongoid" do
        if defined?(Mongoid)
          require 'backgrounder/orm/activemodel'
          ::Mongoid::Document::ClassMethods.send(:include, ::CarrierWave::Backgrounder::ORM::ActiveModel)
        end
      end

    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
carrierwave_backgrounder-1.0.2 lib/backgrounder/railtie.rb
carrierwave_backgrounder-1.0.1 lib/backgrounder/railtie.rb
carrierwave_backgrounder-1.0.0 lib/backgrounder/railtie.rb
carrierwave_backgrounder-1.0.0.beta.2 lib/backgrounder/railtie.rb
carrierwave_backgrounder-1.0.0.beta lib/backgrounder/railtie.rb
carrierwave_backgrounder-0.4.3 lib/backgrounder/railtie.rb
carrierwave_backgrounder_revived-1.0.0 lib/backgrounder/railtie.rb
carrierwave_backgrounder-0.4.2 lib/backgrounder/railtie.rb
carrierwave_backgrounder-0.4.1 lib/backgrounder/railtie.rb
carrierwave_backgrounder-0.4.0 lib/backgrounder/railtie.rb
carrierwave_backgrounder-0.3.0 lib/backgrounder/railtie.rb
carrierwave_backgrounder-0.2.2 lib/backgrounder/railtie.rb
carrierwave_backgrounder-0.2.1 lib/backgrounder/railtie.rb