Sha256: c74fb82a9ac3bb2325a98f01f1d651f82fe1dae727f38d94c63a1bd1809f6fc5

Contents?: true

Size: 913 Bytes

Versions: 2

Compression:

Stored size: 913 Bytes

Contents

require 'flash_session_cookie_middleware'
require 'uploadify_rails_helper'
require 'rails'

# UploadifyRails
module UploadifyRails3
  class Railtie < Rails::Railtie
    config.after_initialize do |app|
=begin
    # this isn't working properly, for some reason
      app.config.middleware.insert_before(
        ActionDispatch::Session::CookieStore,
        FlashSessionCookieMiddleware,
        app.config.session_options[:key]
      )
=end      
      ActionView::Helpers::AssetTagHelper.register_javascript_expansion :uploadify => [
        'uploadify/jquery.uploadify.v2.1.0.min', 
        'uploadify/swfobject', 
        'uploadify/uploadify_rails3'
      ]
      
      ActionView::Base.send :include, UploadifyRailsHelper 
      
    end
    
    rake_tasks do
      load File.expand_path('../tasks.rake', __FILE__)
    end
    
    def self.root
      File.expand_path('../../', __FILE__)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
uploadify_rails3-0.1.1 lib/uploadify_rails3.rb
uploadify_rails3-0.1.0 lib/uploadify_rails3.rb