module SexyContentEditable::FormTagHelper

Public Instance Methods

sexy_content_editable_tag(name, value = nil, options = {}) click to toggle source
# File lib/sexy_content_editable/form_tag_helper.rb, line 6
def sexy_content_editable_tag(name, value = nil, options = {})
  data_options = options[:data] || {}
  data_options.merge! behaviour: 'sexy-content-editable'
  text_field_options = options.merge data: data_options
  text_field name, value, text_field_options
end