Sha256: 49fe70cfc0b0812065e213defe9bc93b64666ad6407863bfc57353828f2c1c23

Contents?: true

Size: 895 Bytes

Versions: 1

Compression:

Stored size: 895 Bytes

Contents

require "rails/engine"
require "uploadcare/rails/settings"

module Uploadcare
  module Rails
    class Engine < ::Rails::Engine
      initializer 'uploadcare-rails.load' do
        # load actual rails extentions
        
        # active record extention for stand-alone file models and models has files
        ActiveSupport.on_load :active_record do
          require 'uploadcare/rails/active_record_has_file'
          require 'uploadcare/rails/active_record_has_group'
        end

        # # JS options, widets from cdn etc
        ActiveSupport.on_load :action_view do
          require 'uploadcare/rails/action_view_include_tags'
          require 'uploadcare/rails/action_view_uploader_tags'

        #   # form helpers
        #   require 'uploadcare/rails/form_helpers'
        #   require 'uploadcare/rails/simple_form' if defined?(SimpleForm)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
uploadcare-rails-1.0.0.rc4 lib/uploadcare/rails/engine.rb