Class: Raw::FileControl
- Inherits:
-
AttributeControl
- Object
- Element
- Control
- AttributeControl
- Raw::FileControl
- Defined in:
- lib/raw/control/attribute/file.rb
Overview
Usage note:
don't forget to set form :method to :multipart
or :method to :post and :enctype to 'multipart/form-data'
Instance Attribute Summary
Attributes inherited from AttributeControl
Attributes included from ElementMixin
#_children, #_parent, #_text, #_view, #id
Instance Method Summary collapse
Methods inherited from AttributeControl
Methods included from XhtmlHelper
#date_select, #datetime_select, #hidden, #href_of, #js_popup, #link_to, #objects_to_options, #onclick_popup, #options, #popup, #submit, #time_select
Methods included from ElementMixin
#add_child, #close, #content, #include, #initialize, #open, #render_children
Constructor Details
This class inherits a constructor from Raw::AttributeControl
Instance Method Details
#render ⇒ Object
12 13 14 15 16 17 |
# File 'lib/raw/control/attribute/file.rb', line 12 def render %{ #{emit_label} <input type="file" id="#{control_id}" name="#{@attribute}" value="#{@object.send(@attribute)}"#{emit_style}#{emit_disabled} /> } end |