Class: Caisson::Helpers::Form::Field::Textarea

Inherits:
Base
  • Object
show all
Defined in:
lib/caisson/helpers/form/field/textarea.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Caisson::Helpers::Form::Field::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Caisson::Helpers::Form::Field::Base

Instance Method Details

#build(name, value, options = {}) ⇒ Object

************************************************************************************* PUBLIC INSTANCE METHODS *************************************************************************************



9
10
11
12
13
14
# File 'lib/caisson/helpers/form/field/textarea.rb', line 9

def build(name, value, options={})
  value = options[:value] if options[:value]
  value = value.join("\n") if value.is_a? Array

  return text_area_tag(name, value, options)
end