Class: Wallaby::Resources::Index::PathHtml

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

Overview

Html cell

Direct Known Subclasses

PolygonHtml

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/path_html.rb', line 9

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