Class: CckForms::ParameterTypeClass::Text
- Inherits:
-
Object
- Object
- CckForms::ParameterTypeClass::Text
- Includes:
- Base
- Defined in:
- lib/cck_forms/parameter_type_class/text.rb
Overview
Represents a long text string (TEXTAREA).
Instance Method Summary collapse
-
#build_form(form_builder, options) ⇒ Object
Builds a TEXTAREA.
-
#to_diff_value(options = {}) ⇒ Object
Wraps DIFF output to .wall (bootstrap-specific bounded block).
Instance Method Details
#build_form(form_builder, options) ⇒ Object
Builds a TEXTAREA
7 8 9 10 |
# File 'lib/cck_forms/parameter_type_class/text.rb', line 7 def build_form(form_builder, ) set_value_in_hash form_builder.text_area :value, {cols: 50, rows: 5, class: 'form-control'}.merge() end |
#to_diff_value(options = {}) ⇒ Object
Wraps DIFF output to .wall (bootstrap-specific bounded block)
13 14 15 16 17 |
# File 'lib/cck_forms/parameter_type_class/text.rb', line 13 def to_diff_value( = {}) to_html().presence.try do |html| "<div class='well well-small'>#{html}</div>".html_safe end end |