Sha256: 1aa064b1efb14586fea6f926c0f2444958b5816fd22463afba96c06cb3616c27

Contents?: true

Size: 502 Bytes

Versions: 2

Compression:

Stored size: 502 Bytes

Contents

# encoding: utf-8

module DynamicImage
  class Railtie < ::Rails::Railtie
    initializer 'dynamic_image' do
      ActionDispatch::Routing::Mapper.send :include, DynamicImage::Routing

      config.after_initialize do |app|
        secret = app.key_generator.generate_key('dynamic_image')
        DynamicImage.digest_verifier = DynamicImage::DigestVerifier.new(secret)
      end

      ActiveSupport.on_load(:active_record) do
        send :include, DynamicImage::BelongsTo
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dynamic_image-2.0.2 lib/dynamic_image/railtie.rb
dynamic_image-2.0.1 lib/dynamic_image/railtie.rb