Module: CKEditor5::Rails::Hooks::Form::FormBuilderExtension
- Defined in:
- lib/ckeditor5/rails/hooks/form.rb
Instance Method Summary collapse
Instance Method Details
#ckeditor5(method, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/ckeditor5/rails/hooks/form.rb', line 6 def ckeditor5(method, = {}) value = if object.respond_to?(method) object.send(method) else [:initial_data] end = .merge( name: object_name, required: .delete(:required), initial_data: value ) @template.ckeditor5_editor(**) end |