General functionality improvement

This commit is contained in:
2014-06-26 17:26:15 +02:00
parent 8730d30621
commit 2a30ff5d3d
19 changed files with 71 additions and 52 deletions
@@ -3,7 +3,9 @@ module Suppliers
# GET /lists
# GET /lists.json
def index
if params[:date].present?
if params[:state] == 'active'
@lists = List.active_for_supplier(current_supplier, page: params[:page], per_page: params[:per_page] || 25)
elsif params[:date].present?
@date = params[:date].present? ? (Date.parse(params[:date]) rescue Date.today) : Date.today
@time = @date.to_time(:utc)
@start_time = @time.beginning_of_day