Sha256: 382c0aba4cf41c7eb29cf9d33e29a1c47b05a5032d6781c1c7dd930f844b632e

Contents?: true

Size: 838 Bytes

Versions: 2

Compression:

Stored size: 838 Bytes

Contents

require 'rails'
require 'sass/rails'

##
# Integrates facades assets into the Rails asset pipeline. 
# 
module Facades
  class Engine < Rails::Engine 
    
    paths['app/views']       << Facades.view_path
    paths['app/controllers'] << File.join(Facades.app_path, 'controllers')
    
    initializer 'load facades assets' do |app|
      app.config.sass.load_paths ||= []
      app.config.sass.load_paths << Facades.scss_path
      app.config.assets.paths << File.join(Facades.app_path, 'assets')
    end
    
    initializer 'configure simple_form' do |app|
      begin
        require 'simple_form'
        ActiveSupport::Deprecation.warn("If you are upgrading Facades > 1.0.3, and rely on the simple form wrappers, please require facades/support/simple_form in an initializer.")
      rescue Exception => e
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
facades-1.0.6 lib/facades/support/rails.rb
facades-1.0.4 lib/facades/support/rails.rb