Sha256: bd26d5677728d419af00a1d498d95f1927dc111c26715c58f0fc90b0bfe160a9

Contents?: true

Size: 300 Bytes

Versions: 34

Compression:

Stored size: 300 Bytes

Contents

module Paperclip
  class EmptyStringAdapter < AbstractAdapter
    def initialize(target)
    end

    def nil?
      false
    end

    def assignment?
      false
    end
  end
end

Paperclip.io_adapters.register Paperclip::EmptyStringAdapter do |target|
  target.is_a?(String) && target.empty?
end

Version data entries

34 entries across 32 versions & 6 rubygems

Version Path
kt-paperclip-4.4.0 lib/paperclip/io_adapters/empty_string_adapter.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/paperclip-5.1.0/lib/paperclip/io_adapters/empty_string_adapter.rb
paperclip-5.1.0 lib/paperclip/io_adapters/empty_string_adapter.rb
paperclip-5.0.0 lib/paperclip/io_adapters/empty_string_adapter.rb
paperclip-4.3.7 lib/paperclip/io_adapters/empty_string_adapter.rb
paperclip_jk-5.0.0.beta2 lib/paperclip/io_adapters/empty_string_adapter.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/paperclip-4.3.6/lib/paperclip/io_adapters/empty_string_adapter.rb
paperclip-5.0.0.beta2 lib/paperclip/io_adapters/empty_string_adapter.rb
paperclip-5.0.0.beta1 lib/paperclip/io_adapters/empty_string_adapter.rb
paperclip-4.3.6 lib/paperclip/io_adapters/empty_string_adapter.rb
paperclip-4.3.5 lib/paperclip/io_adapters/empty_string_adapter.rb
paperclip-4.3.4 lib/paperclip/io_adapters/empty_string_adapter.rb
paperclip-4.3.3 lib/paperclip/io_adapters/empty_string_adapter.rb
paperclip-4.3.2 lib/paperclip/io_adapters/empty_string_adapter.rb
paperclip-4.3.1 lib/paperclip/io_adapters/empty_string_adapter.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/paperclip-4.2.4/lib/paperclip/io_adapters/empty_string_adapter.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/paperclip-4.2.4/lib/paperclip/io_adapters/empty_string_adapter.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/paperclip-4.2.4/lib/paperclip/io_adapters/empty_string_adapter.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/paperclip-4.2.2/lib/paperclip/io_adapters/empty_string_adapter.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/paperclip-4.2.3/lib/paperclip/io_adapters/empty_string_adapter.rb