Permalink
Browse files

Small updates needed for pizza-generators

  • Loading branch information...
1 parent d8359fb commit 1e266a658b5cafbd2828da76ecfc0ab14fc1a8dc Iain Hecker committed Jan 23, 2009
Showing with 11 additions and 0 deletions.
  1. +2 −0 lib/model_based_html/definition_list.rb
  2. +9 −0 lib/model_based_html/table.rb
@@ -24,12 +24,14 @@ def dt_and_dd(method_or_value = nil, options = {}, &block)
dt(method_or_value, options)
dd(method_or_value, options, &block)
end
+ method_alias :show, :dt_and_dd
# Same as dt_and_dd, but escapes the html in method_or_value.
def dt_and_dd_h(method_or_value = nil, options = {}, &block)
dt(method_or_value, options)
dd_h(method_or_value, options, &block)
end
+ method_alias :show_h, :dt_and_dd_h
end
@@ -33,6 +33,15 @@ def head(options = {}, &block)
close_tag("</thead>")
end
+ # Renders a tfoot.
+ def foot(options = {}, &block)
+ return "" if @collection.empty?
+ reset_cell_count
+ open_tag(start_tag(:tfoot, options))
+ yield
+ close_tag("</tfoot>")
+ end
+
# Loops your collection inside a tbody tag. If you don't specify a block
# it will try to render a tbody-element based on the columns specified in
# the thead.

0 comments on commit 1e266a6

Please sign in to comment.