lib/formstrap/form_builder.rb in formstrap-0.3.3 vs lib/formstrap/form_builder.rb in formstrap-0.3.4

- old
+ new

@@ -116,12 +116,16 @@ def repeater_for(attribute, options = {}, &block) @template.render("formstrap/repeater", form: self, attribute: attribute, **options, &block) end - def redactorx(attribute, options = {}) - render_input(:redactorx, attribute, options) + def redactor(attribute, formstrap: true, **options) + if formstrap + render_input(:redactor, attribute, options) + else + text_area attribute, options + end end def search(attribute, options = {}) render_input(:search, attribute, options) end @@ -160,11 +164,15 @@ else url_field attribute, options end end - def wysiwyg(attribute, options = {}) - render_input(:wysiwyg, attribute, options) + def wysiwyg(attribute, formstrap: true, **options) + if formstrap + render_input(:wysiwyg, attribute, options) + else + text_area attribute, options + end end def render_input(name, attribute, options) @template.render("formstrap/#{name}", form: self, attribute: attribute, **options) end