Class: Aureus::DataTableHead
Instance Method Summary
collapse
Methods inherited from Renderable
#compact, #compact_render, #content_tag, #init
Constructor Details
Returns a new instance of DataTableHead.
34
35
36
|
# File 'lib/aureus/data_table.rb', line 34
def initialize
@columns = Array.new
end
|
Instance Method Details
#date(name) ⇒ Object
42
43
44
|
# File 'lib/aureus/data_table.rb', line 42
def date name
@columns << DataTableHeadColumn.new(name,"date-sorting")
end
|
#raw(name) ⇒ Object
46
47
48
|
# File 'lib/aureus/data_table.rb', line 46
def raw name
@columns << DataTableHeadColumn.new(name,"no-sorting")
end
|
#render ⇒ Object
50
51
52
53
54
55
|
# File 'lib/aureus/data_table.rb', line 50
def render
raw ""
content_tag "thead" do
content_tag "tr", compact_render(*@columns)
end
end
|
#text(name) ⇒ Object
38
39
40
|
# File 'lib/aureus/data_table.rb', line 38
def text name
@columns << DataTableHeadColumn.new(name,"text-sorting")
end
|