mirror of
https://github.com/oonyeje/Pearlception_Website_RoR.git
synced 2025-12-25 03:37:40 +00:00
15 lines
447 B
Ruby
15 lines
447 B
Ruby
class StatisticsController < ApplicationController
|
|
|
|
def index
|
|
if params[:from_date] != nil && params[:to_date] != nil
|
|
from_date = Date.parse params[:from_date]
|
|
to_date = Date.parse params[:to_date]
|
|
runs = Run.where(:runDate => from_date.beginning_of_day..to_date.end_of_day)
|
|
puts runs.inspect
|
|
else
|
|
runs = Run.all
|
|
puts runs.inspect
|
|
end
|
|
end
|
|
end
|