Sha256: 265b04f98502abbfc471d7e17325e4f6bbd442ded233e0b47d21ce7c018bd308

Contents?: true

Size: 1010 Bytes

Versions: 20

Compression:

Stored size: 1010 Bytes

Contents

if defined?(Rails::Engine)
  # Rails >= 3
  class Engine < Rails::Engine
    # Mimic old vendored plugin behavior, attachment_fu/lib is autoloaded.
    config.autoload_paths << File.expand_path("..", __FILE__)

    initializer "attachment_fu" do
      require 'geometry'

      ActiveRecord::Base.send(:extend, Technoweenie::AttachmentFu::ActMethods)
      Technoweenie::AttachmentFu.tempfile_path = ATTACHMENT_FU_TEMPFILE_PATH if Object.const_defined?(:ATTACHMENT_FU_TEMPFILE_PATH)
      FileUtils.mkdir_p Technoweenie::AttachmentFu.tempfile_path
    end
  end
else
  # Rails <= 2
  require 'geometry'

  ActiveSupport::Dependencies.autoload_paths << File.expand_path("..", __FILE__)

  ActiveRecord::Base.send(:extend, Technoweenie::AttachmentFu::ActMethods)
  Technoweenie::AttachmentFu.tempfile_path = ATTACHMENT_FU_TEMPFILE_PATH if Object.const_defined?(:ATTACHMENT_FU_TEMPFILE_PATH)
  FileUtils.mkdir_p Technoweenie::AttachmentFu.tempfile_path

  $:.unshift(File.expand_path("../vendor", __FILE__))
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
pothoven-attachment_fu-3.3.2 lib/pothoven-attachment_fu.rb
pothoven-attachment_fu-3.3.1 lib/pothoven-attachment_fu.rb
pothoven-attachment_fu-3.3.0 lib/pothoven-attachment_fu.rb
ss-attachment_fu-3.4.4 lib/ss-attachment_fu.rb
ss-attachment_fu-3.4.3 lib/ss-attachment_fu.rb
pothoven-attachment_fu-3.2.18 lib/pothoven-attachment_fu.rb
pothoven-attachment_fu-3.2.17 lib/pothoven-attachment_fu.rb
ss-attachment_fu-3.4.2 lib/ss-attachment_fu.rb
ss-attachment_fu-3.4.1 lib/ss-attachment_fu.rb
ss-attachment_fu-3.4.0 lib/ss-attachment_fu.rb
ss-attachment_fu-3.3.0 lib/ss-attachment_fu.rb
pothoven-attachment_fu-3.2.16 lib/pothoven-attachment_fu.rb
ss-attachment_fu-3.2.19 lib/ss-attachment_fu.rb
ss-attachment_fu-3.2.18 lib/pothoven-attachment_fu.rb
ss-attachment_fu-3.2.17 lib/pothoven-attachment_fu.rb
pothoven-attachment_fu-3.2.15 lib/pothoven-attachment_fu.rb
pothoven-attachment_fu-3.2.14 lib/pothoven-attachment_fu.rb
pothoven-attachment_fu-3.2.13 lib/pothoven-attachment_fu.rb
pothoven-attachment_fu-3.2.12 lib/pothoven-attachment_fu.rb
pothoven-attachment_fu-3.2.11 lib/pothoven-attachment_fu.rb