From 74c78fe9db8ba174eb16cddc0f7383484b3e38a3 Mon Sep 17 00:00:00 2001 From: jwollert Date: Thu, 10 Feb 2011 13:14:52 +0100 Subject: [PATCH] remove simple table for now. gets rid of code duplication too, so a certain someone won't go all 'DUDE, seriously' on me --- lib/widget/table.rb | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/widget/table.rb b/lib/widget/table.rb index 2d43bf15c4..dcd2a0551a 100644 --- a/lib/widget/table.rb +++ b/lib/widget/table.rb @@ -24,14 +24,10 @@ class Widget::Table < Widget::Base end def table_widget - if @query.depth_of(:column) + @query.depth_of(:row) == 0 - Widget::Table::SimpleTable - else - if @query.depth_of(:row) == 0 - @query.row(:singleton_value) - elsif @query.depth_of(:column) == 0 - @query.column(:singleton_value) - end + if @query.depth_of(:row) == 0 + @query.row(:singleton_value) + elsif @query.depth_of(:column) == 0 + @query.column(:singleton_value) end Widget::Table::ReportTable end