Module: Formz::AutoEncoding
- Defined in:
- lib/formz/autoencoding.rb
Overview
Formz::AutoEncoding
Automatically sets form enctype to ‘multipart/form-data’ when a file field is present.
Instance Method Summary collapse
Instance Method Details
#create_tag(name, contents, attrs, &block) ⇒ Object
11 12 13 14 |
# File 'lib/formz/autoencoding.rb', line 11 def create_tag name, contents, attrs, &block @__form_encoding = 'multipart/form-data' if name == :file super end |