Module: RegexField::FormBuilder

Extended by:
ActiveSupport::Concern
Defined in:
lib/regex_field/form_builder.rb

Instance Method Summary collapse

Instance Method Details

#regex_field(name, options = {}) ⇒ Object



5
6
7
8
# File 'lib/regex_field/form_builder.rb', line 5

def regex_field(name, options = {})
  (:pre, object.send(name), class: 'regex', contenteditable: true, data: {target: name}) +
    hidden_field(name, options)
end