Sha256: ab2081bec0d50c99357fb2845f97c576c965c7abd730c76cae0f124a9ade0872

Contents?: true

Size: 589 Bytes

Versions: 6

Compression:

Stored size: 589 Bytes

Contents

module Bootswitch
  class Railtie < Rails::Railtie
    initializer 'bootswitch.add_view_paths', :after => :add_view_paths do |app|
      ActiveSupport.on_load(:action_controller) do
        prepend_view_path Gem.loaded_specs['bootswitch'].full_gem_path + '/app/views'
      end
    end

    initializer 'bootswitch.add_precompiled_assets' do |app|
      ActiveSupport.on_load(:action_controller) do
        for theme in Bootswitch.configuration.themes do
          Rails.application.config.assets.precompile += ['bootswatch/' + theme + '/theme.css']
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bootswitch-0.6.0 lib/bootswitch/railtie.rb
bootswitch-0.5.4 lib/bootswitch/railtie.rb
bootswitch-0.5.3 lib/bootswitch/railtie.rb
bootswitch-0.5.2 lib/bootswitch/railtie.rb
bootswitch-0.5.1 lib/bootswitch/railtie.rb
bootswitch-0.5.0 lib/bootswitch/railtie.rb