Class: Aureus::Components::DataTableHead
Instance Method Summary
collapse
Methods inherited from Renderable
#compact, #compact_render, #content_tag, #init
Constructor Details
Returns a new instance of DataTableHead.
47
48
49
|
# File 'lib/aureus/components/data_table.rb', line 47
def initialize
@columns = Array.new
end
|
Instance Method Details
#date(name) ⇒ Object
55
56
57
|
# File 'lib/aureus/components/data_table.rb', line 55
def date name
@columns << DataTableHeadColumn.new(name,'date-sorting')
end
|
#raw(name) ⇒ Object
59
60
61
|
# File 'lib/aureus/components/data_table.rb', line 59
def raw name
@columns << DataTableHeadColumn.new(name,'no-sorting')
end
|
#render ⇒ Object
63
64
65
66
67
68
|
# File 'lib/aureus/components/data_table.rb', line 63
def render
raw ''
content_tag 'thead' do
content_tag 'tr', compact_render(*@columns)
end
end
|
#text(name) ⇒ Object
51
52
53
|
# File 'lib/aureus/components/data_table.rb', line 51
def text name
@columns << DataTableHeadColumn.new(name,'text-sorting')
end
|