class Interview::HtmlTextAttribute

Attributes

cut[RW]

todo: in eigenes gem auslagern?

plain_text[RW]

todo: in eigenes gem auslagern?

Protected Instance Methods

build_read(b) click to toggle source
# File lib/interview/controls/html_text_attribute.rb, line 10
def build_read(b)
  return if value.nil?
  val = value
  val.gsub! /<.+?>/, ' ' if @plain_text
  val = val[0..29] + '...' if @cut and val.size > 30
  b << val.html_safe
end
build_write(b) click to toggle source
# File lib/interview/controls/html_text_attribute.rb, line 18
def build_write(b)
  b << form_builder.cktext_area(@method, class: 'form-control')
end