Class: TemplateEditorInput
- Inherits:
-
SimpleForm::Inputs::TextInput
- Object
- SimpleForm::Inputs::TextInput
- TemplateEditorInput
- Includes:
- Cms::FormBuilder::DefaultInput
- Defined in:
- app/inputs/template_editor_input.rb
Instance Method Summary collapse
Methods included from Cms::FormBuilder::DefaultInput
Instance Method Details
#input(_wrapper_options = nil) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'app/inputs/template_editor_input.rb', line 9 def input( = nil) if render_template_input? [:default] = object.class.default_template [:default_handler] = "erb" unless [:default_handler] view = @builder.select "#{attribute_name}_handler", ActionView::Template.template_handler_extensions, selected: [:default_handler] view << '<br />'.html_safe extract_default view << @builder.text_area(attribute_name, ).html_safe end end |
#label(_wrapper_options = nil) ⇒ Object
5 6 7 |
# File 'app/inputs/template_editor_input.rb', line 5 def label( = nil) super if render_template_input? end |