Module: ActiveModel::Form::FileAttribute

Defined in:
lib/active_model/form/attributes.rb

Class Method Summary collapse

Class Method Details

.number?Boolean

Returns:

  • (Boolean)

135
136
137
# File 'lib/active_model/form/attributes.rb', line 135

def self.number?
  false
end

.parse(v) ⇒ Object


126
127
128
129
# File 'lib/active_model/form/attributes.rb', line 126

def self.parse(v)
  raise "Couldn't parse file attribute value: '#{v}'" unless v.is_a?(ActionDispatch::Http::UploadedFile)
  v
end

.typeObject


131
132
133
# File 'lib/active_model/form/attributes.rb', line 131

def self.type
  :file
end