Module: FlexiModel::AttachmentField::ClassMethods
- Defined in:
- lib/flexi_model/attachment_field.rb
Instance Method Summary collapse
-
#attachment_field(name, options = { }) ⇒ Object
(also: #_attachment)
Set filed definition which is used as attachment accessor.
Instance Method Details
#attachment_field(name, options = { }) ⇒ Object Also known as: _attachment
Set filed definition which is used as attachment accessor.
Ie. Paperclip exposes < attachment name > method over the host class. Using this method we can hint admin panel that we have a field which accepts file
12 13 14 15 |
# File 'lib/flexi_model/attachment_field.rb', line 12 def (name, = { }) [:accessors] = false flexi_field name, :attachment, end |