Class: Chop::Form::SingleFile
Instance Attribute Summary
Attributes inherited from Field
#field, #label, #path, #session, #value
Instance Method Summary collapse
Methods inherited from Field
candidates, for, from, #get_value
Instance Method Details
#fill_in! ⇒ Object
186 187 188 189 |
# File 'lib/chop/form.rb', line 186 def fill_in! assert_single_file! field.set file_path end |
#matches? ⇒ Boolean
182 183 184 |
# File 'lib/chop/form.rb', line 182 def matches? field[:type] == "file" && !field[:multiple] end |