Method: TimelogHelper#select_hours

Defined in:
app/helpers/timelog_helper.rb

#select_hours(data, criteria, value) ⇒ Object



59
60
61
62
63
64
65
# File 'app/helpers/timelog_helper.rb', line 59

def select_hours(data, criteria, value)
  if value.to_s.empty?
    data.select {|row| row[criteria].blank?}
  else
    data.select {|row| row[criteria].to_s == value.to_s}
  end
end