Sha256: 965e909c68d541b0ce337f99fdfa0caceb9ec8ac6bee64c75ac2a7123c22d7ff

Contents?: true

Size: 782 Bytes

Versions: 5

Compression:

Stored size: 782 Bytes

Contents

module Qbrick
  class ImageSizeDelegator
    def method_missing(method, *args, &block)
      Qbrick::ImageSize.send(method, *args, &block)
    rescue NoMethodError
      super
    end
  end

  class Engine < ::Rails::Engine
    isolate_namespace Qbrick

    config.i18n.fallbacks = [:de]
    config.i18n.load_path += Dir[Qbrick::Engine.root.join('config', 'locales', '**', '*.{yml}').to_s]

    # defaults to nil
    config.sublime_video_token = nil

    # delegate image size config to ImageSize class
    config.image_sizes = ImageSizeDelegator.new

    initializer 'qbrick.initialize_haml_dependency_tracker' do
      require 'action_view/dependency_tracker'
      ActionView::DependencyTracker.register_tracker :haml, ActionView::DependencyTracker::ERBTracker
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
qbrick-2.6.1 lib/qbrick/engine.rb
qbrick-2.6.0 lib/qbrick/engine.rb
qbrick-2.5.2 lib/qbrick/engine.rb
qbrick-2.5.1 lib/qbrick/engine.rb
qbrick-2.5.0 lib/qbrick/engine.rb