Sha256: 683393cc4718f222a08f122e53d7d547fa21674909815b3974215ff49a4943f6

Contents?: true

Size: 793 Bytes

Versions: 5

Compression:

Stored size: 793 Bytes

Contents

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

  class Engine < ::Rails::Engine
    isolate_namespace Kuhsaft

    config.i18n.fallbacks = [:de]
    config.i18n.load_path += Dir[Kuhsaft::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 'kuhsaft.initialize_haml_dependency_tracker' do |app|
      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
kuhsaft-2.3.4 lib/kuhsaft/engine.rb
kuhsaft-2.3.3 lib/kuhsaft/engine.rb
kuhsaft-2.3.2 lib/kuhsaft/engine.rb
kuhsaft-2.3.1 lib/kuhsaft/engine.rb
kuhsaft-2.3.0 lib/kuhsaft/engine.rb