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
formtastic-2.3.0.rc2 lib/formtastic/helpers/file_column_detection.rb
formtastic-2.3.0.rc lib/formtastic/helpers/file_column_detection.rb
formtastic-2.2.1 lib/formtastic/helpers/file_column_detection.rb
formtastic-2.2.0 lib/formtastic/helpers/file_column_detection.rb
formtastic-2.2.0.rc lib/formtastic/helpers/file_column_detection.rb
formtastic-2.1.1 lib/formtastic/helpers/file_column_detection.rb
formtastic-2.1.0 lib/formtastic/helpers/file_column_detection.rb
formtastic-2.1.0.rc lib/formtastic/helpers/file_column_detection.rb
formtastic-2.1.0.beta1 lib/formtastic/helpers/file_column_detection.rb
formtastic-2.0.2 lib/formtastic/helpers/file_column_detection.rb
formtastic-2.0.1 lib/formtastic/helpers/file_column_detection.rb
formtastic-2.0.0 lib/formtastic/helpers/file_column_detection.rb
formtastic-2.0.0.rc5 lib/formtastic/helpers/file_column_detection.rb
formtastic-2.0.0.rc4 lib/formtastic/helpers/file_column_detection.rb
formtastic-2.0.0.rc3 lib/formtastic/helpers/file_column_detection.rb
formtastic-2.0.0.rc2 lib/formtastic/helpers/file_column_detection.rb
formtastic-2.0.0.rc1 lib/formtastic/helpers/file_column_detection.rb
nuatt-formtastic-0.2.3 lib/formtastic/helpers/file_column_detection.rb