<% js_data = { csspath: field.css_location, jspath: field.js_location, options: field.config, locations: field.assets } %> <%= form.text_area field.method_name, field.html_attributes.reverse_merge(data: { richtext: 'codemirror', options: js_data.to_json }).reverse_merge({ value: field.form_value }) %>