Sha256: c367ffcb9b9912d4cd0f41ab772aa5693671d7a05e131ed21c6c45e3cb374a61

Contents?: true

Size: 354 Bytes

Versions: 21

Compression:

Stored size: 354 Bytes

Contents

# frozen_string_literal: true

module Shimmer
  module Form
    class PdfField < Field
      self.type = :pdf

      class << self
        def can_handle?(method)
          method.to_s.end_with?("pdf")
        end
      end

      def render
        builder.file_field method, options.reverse_merge(accept: "application/pdf")
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
shimmer-0.0.41 lib/shimmer/form/pdf_field.rb
shimmer-0.0.40 lib/shimmer/form/pdf_field.rb
shimmer-0.0.39 lib/shimmer/form/pdf_field.rb
shimmer-0.0.38 lib/shimmer/form/pdf_field.rb
shimmer-0.0.37 lib/shimmer/form/pdf_field.rb
shimmer-0.0.36 lib/shimmer/form/pdf_field.rb
shimmer-0.0.35 lib/shimmer/form/pdf_field.rb
shimmer-0.0.34 lib/shimmer/form/pdf_field.rb
shimmer-0.0.33 lib/shimmer/form/pdf_field.rb
shimmer-0.0.32 lib/shimmer/form/pdf_field.rb
shimmer-0.0.31 lib/shimmer/form/pdf_field.rb
shimmer-0.0.30 lib/shimmer/form/pdf_field.rb
shimmer-0.0.29 lib/shimmer/form/pdf_field.rb
shimmer-0.0.28 lib/shimmer/form/pdf_field.rb
shimmer-0.0.27 lib/shimmer/form/pdf_field.rb
shimmer-0.0.26 lib/shimmer/form/pdf_field.rb
shimmer-0.0.25 lib/shimmer/form/pdf_field.rb
shimmer-0.0.24 lib/shimmer/form/pdf_field.rb
shimmer-0.0.23 lib/shimmer/form/pdf_field.rb
shimmer-0.0.22 lib/shimmer/form/pdf_field.rb