Module: Cms::FormTagHelper
- Defined in:
- app/helpers/cms/form_tag_helper.rb
Instance Method Summary collapse
- #drop_down(object, method, choices, options = {}, html_options = {}) ⇒ Object
-
#drop_down_tag(name, option_tags = nil, options = {}) ⇒ Object
A drop-down is just a specialized HTML select.
- #text_editor(object_name, method, options = {}) ⇒ Object
-
#text_editor_options(options = {}) ⇒ Object
A text editor is an HTML WYSIWYG editor.
- #text_editor_tag(name, content = nil, options = {}) ⇒ Object
Instance Method Details
#drop_down(object, method, choices, options = {}, html_options = {}) ⇒ Object
10 11 12 |
# File 'app/helpers/cms/form_tag_helper.rb', line 10 def drop_down(object, method, choices, = {}, = {}) select(object, method, choices, , ) end |
#drop_down_tag(name, option_tags = nil, options = {}) ⇒ Object
A drop-down is just a specialized HTML select
6 7 8 |
# File 'app/helpers/cms/form_tag_helper.rb', line 6 def drop_down_tag(name, = nil, = {}) select_tag(name, , ) end |
#text_editor(object_name, method, options = {}) ⇒ Object
27 28 29 |
# File 'app/helpers/cms/form_tag_helper.rb', line 27 def text_editor(object_name, method, = {}) text_area(object_name, method, ()) end |
#text_editor_options(options = {}) ⇒ Object
A text editor is an HTML WYSIWYG editor. The result of this will be a div with a select and a textarea in it.
17 18 19 20 21 |
# File 'app/helpers/cms/form_tag_helper.rb', line 17 def (={}) opts = .dup (opts[:class] ||= "") << " editor" opts end |
#text_editor_tag(name, content = nil, options = {}) ⇒ Object
23 24 25 |
# File 'app/helpers/cms/form_tag_helper.rb', line 23 def text_editor_tag(name, content = nil, = {}) text_area_tag(name, content, ()) end |