def time_filter(id, name, value)
      html = "<select id=\"#{id}\" name=\"#{name}\">"
      html += "<option value=\"\">-</option>"
      [1, 3, 6, 12, 24].each do |h|
        selected = h.to_s == value ? 'selected="selected"' : ''
        html += "<option #{selected} value=\"#{h}\">#{h} #{h==1 ? "hour" : "hours"} ago</option>"
      end
      [3, 7, 14, 28].each do |d|
        selected = (d*24).to_s == value ? 'selected="selected"' : ''
        html += "<option #{selected} value=\"#{d*24}\">#{d} days ago</option>"
      end
      html += "</select>"
      html.html_safe
    end
def time_filter(id, name, value)
      html = "<select id=\"#{id}\" name=\"#{name}\">"
      html += "<option value=\"\">-</option>"
      [1, 3, 6, 12, 24].each do |h|
        selected = h.to_s == value ? 'selected="selected"' : ''
        html += "<option #{selected} value=\"#{h}\">#{h} #{h==1 ? "hour" : "hours"} ago</option>"
      end
      [3, 7, 14, 28].each do |d|
        selected = (d*24).to_s == value ? 'selected="selected"' : ''
        html += "<option #{selected} value=\"#{d*24}\">#{d} days ago</option>"
      end
      html += "</select>"
      html.html_safe
    end
resque-cleaner helpers