Module: Bootsy::FormHelper
- Defined in:
- lib/bootsy/form_helper.rb
Overview
Public: Module to include Bootsy in ‘ActionView::Base`.
Instance Method Summary collapse
-
#bootsy_area(object_name, method, options = {}) ⇒ Object
Public: Return a textarea element with proper attributes to be loaded as a WYSIWYG editor.
Instance Method Details
#bootsy_area(object_name, method, options = {}) ⇒ Object
Public: Return a textarea element with proper attributes to be loaded as a WYSIWYG editor.
object_name - The String or Symbol identifier of the object assigned
to the template.
method - The Symbol attribute name on the object assigned to the
form builder that will tailor the editor.
options - The Hash of options used to enable/disable features of
the editor (default: {}):
:container - The `Bootsy::Container` instance model
that will be referenced by the editor's
image gallery. Defaults to the object
assigned to the template, if it is a
`Container`.
:uploader - The Boolean value used to enable/disable
the image upload feature. Default: true,
if a`Container` is found, false otherwise.
:editor_options - The Hash of options with Boolean values
usedto enable/disable features of the
editor. Available options are described ib
the Bootsyinitializer file (which is the
default for this argument).
29 30 31 32 33 34 35 36 37 |
# File 'lib/bootsy/form_helper.rb', line 29 def bootsy_area(object_name, method, = {}) container = [:container] || [:object] set_gallery_id(container, ) text_area(object_name, method, ()) + modal(, container) + gallery_id_param(object_name, container, ) end |