Class: HstoreInput
- Inherits:
-
Formtastic::Inputs::TextInput
- Object
- Formtastic::Inputs::TextInput
- HstoreInput
- Defined in:
- app/inputs/hstore_input.rb
Instance Method Summary collapse
Instance Method Details
#to_html ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/inputs/hstore_input.rb', line 4 def to_html html = '<div class="jsoneditor-wrap">' Rails.logger.error '#' * 10 Rails.logger.error method current_value = @object.public_send method html << builder.text_area(method, .merge( value: (current_value.respond_to?(:to_json) ? current_value.to_json : ''))) html << '</div>' html << '<div style="clear: both"></div>' input_wrapping do label_html << html.html_safe end end |