Sha256: a8be7d0f02b8acaa2bbdf1b145751c627d093a3dd0cd5c08351bf55864ad172d

Contents?: true

Size: 543 Bytes

Versions: 14

Compression:

Stored size: 543 Bytes

Contents

#FileUtils.rm_rf(Dir["#{Rails.root}/spec/support/uploads"])

if defined?(CarrierWave)
  #CarrierWave.configure do |config|
  #  config.storage = :file
  #  config.enable_processing = false
  #end

  CarrierWave::Uploader::Base.descendants.each do |klass|
    next if klass.anonymous?
    klass.class_eval do
      def cache_dir
        "#{Rails.root}/public/tmp/spec/uploads/tmp"
      end

      def store_dir
        "#{Rails.root}/public/tmp/spec/uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ab_admin-0.3.6 features/support/carrierwave.rb
ab_admin-0.3.5 features/support/carrierwave.rb
ab_admin-0.3.4 features/support/carrierwave.rb
ab_admin-0.3.3 features/support/carrierwave.rb
ab_admin-0.3.2 features/support/carrierwave.rb
ab_admin-0.3.1 features/support/carrierwave.rb
ab_admin-0.3.0 features/support/carrierwave.rb
ab_admin-0.2.3 features/support/carrierwave.rb
ab_admin-0.2.2 features/support/carrierwave.rb
ab_admin-0.2.1 features/support/carrierwave.rb
ab_admin-0.2.0 features/support/carrierwave.rb
ab_admin-0.1.2 features/support/carrierwave.rb
ab_admin-0.1.1 features/support/carrierwave.rb
ab_admin-0.1.0 features/support/carrierwave.rb