Sha256: a398e66f842b06eef8f8f2fec612cfe8b695138c9f79b0cf5256174a7828fb92

Contents?: true

Size: 411 Bytes

Versions: 38

Compression:

Stored size: 411 Bytes

Contents

module Formtastic
  module Helpers
    # @private
    module FileColumnDetection

      def is_file?(method, options = {})
        @files ||= {}
        @files[method] ||= (options[:as].present? && options[:as] == :file) || begin
          file = @object.send(method) if @object && @object.respond_to?(method)
          file && file_methods.any?{|m| file.respond_to?(m)}
        end
      end

    end
  end
end

Version data entries

38 entries across 38 versions & 4 rubygems

Version Path
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/formtastic-4.0.0/lib/formtastic/helpers/file_column_detection.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/formtastic-4.0.0/lib/formtastic/helpers/file_column_detection.rb
formtastic-4.0.0 lib/formtastic/helpers/file_column_detection.rb
formtastic-4.0.0.rc1 lib/formtastic/helpers/file_column_detection.rb
formtastic-3.1.5 lib/formtastic/helpers/file_column_detection.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/formtastic-3.1.4/lib/formtastic/helpers/file_column_detection.rb
formtastic-3.1.4 lib/formtastic/helpers/file_column_detection.rb
formtastic-3.1.3 lib/formtastic/helpers/file_column_detection.rb
formtastic-3.1.2 lib/formtastic/helpers/file_column_detection.rb
formtastic-3.1.1 lib/formtastic/helpers/file_column_detection.rb
formtastic-3.1.0 lib/formtastic/helpers/file_column_detection.rb
formtastic-3.1.0.rc2 lib/formtastic/helpers/file_column_detection.rb
formtastic-3.1.0.rc1 lib/formtastic/helpers/file_column_detection.rb
formtastic-3.0.0 lib/formtastic/helpers/file_column_detection.rb
formtastic-3.0.0.rc2 lib/formtastic/helpers/file_column_detection.rb
formtastic-2.3.1 lib/formtastic/helpers/file_column_detection.rb
formtastic-2.3.0 lib/formtastic/helpers/file_column_detection.rb
formtastic-3.0.0.rc lib/formtastic/helpers/file_column_detection.rb
formtastic-2.3.0.rc4 lib/formtastic/helpers/file_column_detection.rb
formtastic-2.3.0.rc3 lib/formtastic/helpers/file_column_detection.rb