You have some little error in this script :
<%= link_to 'Previous', tasks_url(:date => @date.prev_day) %>
<%= if @date.past? = link_to 'Next day', tasks_url(:date => @date.next_day) %>
Here, you are passing a date params to the route.
@date = Date.parse(params[:day]) rescue Date.today
Here you are using a day
params instead of params[:date]
@tasks = Task.where( Date.today )
This is not the correct syntax to find task by date and you did not use the @date
above but the date of today, replace it by Task.where(day: @date)
I hope this would solve most of your issues, if not please give us more details about the error you encounter.