Sha256: 86a6715621b59ae04bba51459c5468efbf0104f5c01aedf8eb7f1514a450558c

Contents?: true

Size: 763 Bytes

Versions: 2

Compression:

Stored size: 763 Bytes

Contents

module Admin
  class Engine < Rails::Engine

    initializer :assets do |config|

      # Add all "frontend libraries" (bootstrap etc.) to the asset pipeline load path. 
      # This is necessary because typus uses a nondefault directory structure in vendor/assets.
      extra_asset_paths = Dir.glob(File.join(root, 'vendor/assets/*/{img,images,css,js}'))
      Rails.application.config.assets.paths += extra_asset_paths

      # Add nondefault image directory to the precompile array, otherwise images in there won't
      # become available for the asset pipeline.
      Rails.application.config.assets.precompile << %r{^img/.+}
      Rails.application.config.assets.precompile += %w( glyphicons-halflings.png glyphicons-halflings-white.png)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
brainsome_typus-4.0.0.beta3 lib/typus/engine.rb
brainsome_typus-4.0.0.beta2 lib/typus/engine.rb