Class: Wallaby::Resources::Index::StringHtml

Inherits:
Cell
  • Object
show all
Defined in:
app/views/wallaby/resources/index/string_html.rb

Overview

Html cell

Direct Known Subclasses

StiHtml, UuidHtml

Instance Method Summary collapse

Instance Method Details

#renderString

Returns:

  • (String)


9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'app/views/wallaby/resources/index/string_html.rb', line 9

def render
  if value.nil?
    null
  else
    max = [:max] || .max
    self.value = value.to_s
    if value.length > max
      concat (:span, value.truncate(max))
      itooltip value
    else
      value
    end
  end
end