module RegexField::FormBuilder
Public Instance Methods
regex_field(name, options = {})
click to toggle source
# File lib/regex_field/form_builder.rb, line 5 def regex_field(name, options = {}) content_tag(:pre, object.send(name), class: 'regex', contenteditable: true, data: {target: name}) + hidden_field(name, options) end