Sha256: 3196f886ae5efb09bad1537b541df1dbc3191b258698dea37f3aa4d60ffc627c

Contents?: true

Size: 820 Bytes

Versions: 18

Compression:

Stored size: 820 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")
      require "uploader/hooks/simple_form"   if Object.const_defined?("SimpleForm")
    end
  end
end

Version data entries

18 entries across 18 versions & 3 rubygems

Version Path
rails-uploader-0.2.2 lib/uploader/engine.rb
rails-uploader-0.2.1 lib/uploader/engine.rb
rails-uploader-0.2.0 lib/uploader/engine.rb
rails-uploader-0.1.4 lib/uploader/engine.rb
rails-uploader-0.1.3 lib/uploader/engine.rb
rails-uploader-0.1.2 lib/uploader/engine.rb
glebtv-rails-uploader-0.1.3 lib/uploader/engine.rb
glebtv-rails-uploader-0.1.2 lib/uploader/engine.rb
glebtv-rails-uploader-0.1.1 lib/uploader/engine.rb
glebtv-rails-uploader-0.0.8 lib/uploader/engine.rb
rails-uploader-0.1.0 lib/uploader/engine.rb
rails-uploader-0.0.8 lib/uploader/engine.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.7/lib/uploader/engine.rb
rails-uploader-0.0.7 lib/uploader/engine.rb
rails-uploader-0.0.6 lib/uploader/engine.rb
rails-uploader-0.0.5 lib/uploader/engine.rb
rails-uploader-0.0.4 lib/uploader/engine.rb
rails-uploader-0.0.3 lib/uploader/engine.rb