Sha256: 653f92fa614d6beb006205766c121ea7013aab1362c4ae41c135e1ddb622c4aa
Contents?: true
Size: 441 Bytes
Versions: 1
Compression:
Stored size: 441 Bytes
Contents
# frozen_string_literal: true 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
formtastic-5.0.0 | lib/formtastic/helpers/file_column_detection.rb |