summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/helpers/timelog_helper.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/helpers/timelog_helper.rb b/app/helpers/timelog_helper.rb
index f43bce0bc..d34694f1b 100644
--- a/app/helpers/timelog_helper.rb
+++ b/app/helpers/timelog_helper.rb
@@ -35,7 +35,11 @@ module TimelogHelper
end
def select_hours(data, criteria, value)
- data.select {|row| row[criteria] == value}
+ if value.to_s.empty?
+ data.select {|row| row[criteria].blank? }
+ else
+ data.select {|row| row[criteria] == value}
+ end
end
def sum_hours(data)