Sha256: 852452eb5b54ea83a14c0d2f129f2949a03a025f9888d2534c271f11c5743809

Contents?: true

Size: 815 Bytes

Versions: 12

Compression:

Stored size: 815 Bytes

Contents

module Wiselinks
  module Rails
    class Engine < ::Rails::Engine
      initializer 'wiselinks.register_logger' do        
        Wiselinks.options[:logger] = ::Rails.logger
      end

      initializer "wiselinks.register_extensions"  do
        ActionDispatch::Request.send :include, Request
        ActionController::Base.send :include, ControllerMethods
        ActionController::Base.send :include, Rendering
        ActionView::Base.send :include, Helpers        
      end    

      initializer "wiselinks.register_assets_digest"  do
        if ::Rails.application.config.assets.digest && ::Rails.application.config.assets.digests.present?
          Wiselinks.options[:assets_digest] ||= Digest::MD5.hexdigest(::Rails.application.config.assets.digests.values.join)
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
wiselinks-0.6.4 lib/wiselinks/rails.rb
wiselinks-0.6.3 lib/wiselinks/rails.rb
wiselinks-0.6.2 lib/wiselinks/rails.rb
wiselinks-0.6.1 lib/wiselinks/rails.rb
wiselinks-0.6.0 lib/wiselinks/rails.rb
wiselinks-0.5.6 lib/wiselinks/rails.rb
wiselinks-0.5.5 lib/wiselinks/rails.rb
wiselinks-0.5.4 lib/wiselinks/rails.rb
wiselinks-0.5.3 lib/wiselinks/rails.rb
wiselinks-0.5.2 lib/wiselinks/rails.rb
wiselinks-0.5.1 lib/wiselinks/rails.rb
wiselinks-0.5.0 lib/wiselinks/rails.rb