Class: FactoryForm::LongAnswer

Inherits:
Field
  • Object
show all
Defined in:
lib/factoryform/long_answer.rb

Instance Attribute Summary collapse

Attributes inherited from Field

#field_type, #hint, #id, #label, #required, #unique, #validation_format

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ LongAnswer

Returns a new instance of LongAnswer.



4
5
6
7
8
# File 'lib/factoryform/long_answer.rb', line 4

def initialize(options={})
  options[:field_type] = "long_answer"
  super(options)
  @min_chars = options[:options][:min_chars] || 500 # Default number of chars 500
end

Instance Attribute Details

#min_charsObject

Returns the value of attribute min_chars.



3
4
5
# File 'lib/factoryform/long_answer.rb', line 3

def min_chars
  @min_chars
end