class Aureus::Components::DataTableRow
Public Class Methods
new()
click to toggle source
# File lib/aureus/components/data_table.rb, line 60 def initialize init_haml_helpers @cells = Array.new @buttons = Array.new @identifier = '' end
Public Instance Methods
cell(data='', &block)
click to toggle source
# File lib/aureus/components/data_table.rb, line 71 def cell(data='', &block) if block @cells << DataTableRowCell.new(capture_haml(&block)) else @cells << DataTableRowCell.new(data) end end
identifier(value)
click to toggle source
# File lib/aureus/components/data_table.rb, line 67 def identifier(value) @identifier = value end
render()
click to toggle source
# File lib/aureus/components/data_table.rb, line 91 def render content_tag 'tr', compact_render(*@cells)+content_tag('td',compact_render(*@buttons),class: 'buttons'), id: @identifier end