Sha256: 63c992c0d8f9863310325dba4778f5d9c8bb0fafa026b9f783351b3ab9571dfc

Contents?: true

Size: 736 Bytes

Versions: 6

Compression:

Stored size: 736 Bytes

Contents

require 'rails'
require 'uploader'

module Uploader
  class Engine < ::Rails::Engine
    isolate_namespace Uploader
    
    initializer "uploader.assets_precompile" do |app|
      app.config.assets.precompile += Uploader.assets
    end
    
    initializer "uploader.helpers" do    
      ActiveSupport.on_load :action_view do
        ActionView::Base.send(:include, Uploader::Helpers::FormTagHelper)
        ActionView::Helpers::FormBuilder.send(:include, Uploader::Helpers::FormBuilder)
      end
    end
   
    initializer "uploader.hooks" do
      require "uploader/hooks/active_record" if Object.const_defined?("ActiveRecord")
      require "uploader/hooks/formtastic"    if Object.const_defined?("Formtastic")
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/lib/uploader/engine.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/lib/uploader/engine.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/lib/uploader/engine.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/lib/uploader/engine.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/lib/uploader/engine.rb
rails-uploader-0.0.1 lib/uploader/engine.rb