Sha256: daa762fc47664492ac07810ec59b07d948d5004777e0aaefd04e8d9c55aebe11

Contents?: true

Size: 703 Bytes

Versions: 1

Compression:

Stored size: 703 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'
        require 'facades/support/simple_form'
      rescue Exception => e
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facades-1.0.3 lib/facades/support/rails.rb