Class: ExpressAdmin::CodeEditor
- Inherits:
-
ExpressTemplates::Components::Forms::FormComponent
- Object
- ExpressTemplates::Components::Forms::FormComponent
- ExpressAdmin::CodeEditor
- Defined in:
- app/components/express_admin/code_editor.rb
Instance Method Summary collapse
- #field ⇒ Object
- #field_helper_options ⇒ Object
- #field_id ⇒ Object
- #field_name ⇒ Object
- #object ⇒ Object
- #object_type ⇒ Object
- #rows ⇒ Object
Instance Method Details
#field ⇒ Object
23 24 25 |
# File 'app/components/express_admin/code_editor.rb', line 23 def field config[:id] end |
#field_helper_options ⇒ Object
15 16 17 |
# File 'app/components/express_admin/code_editor.rb', line 15 def {rows: rows, class: "hide", hidden: true}.merge(super) end |
#field_id ⇒ Object
35 36 37 |
# File 'app/components/express_admin/code_editor.rb', line 35 def field_id "#{object_type}_#{field}_#{object.id}" end |
#field_name ⇒ Object
31 32 33 |
# File 'app/components/express_admin/code_editor.rb', line 31 def field_name "#{object_type}[#{field}]" end |
#object ⇒ Object
19 20 21 |
# File 'app/components/express_admin/code_editor.rb', line 19 def object self.send resource_name end |
#object_type ⇒ Object
39 40 41 |
# File 'app/components/express_admin/code_editor.rb', line 39 def object_type object.class.to_s.demodulize.underscore end |
#rows ⇒ Object
27 28 29 |
# File 'app/components/express_admin/code_editor.rb', line 27 def rows config[:rows] end |