Convert to using symbols everywhere

This commit is contained in:
Matt Rogers 2019-04-11 11:28:43 -05:00
parent fc17a03bc0
commit 63ac90ebb2
No known key found for this signature in database
GPG key ID: 605D017C07EB4316
2 changed files with 12 additions and 19 deletions

View file

@ -21,12 +21,12 @@ module Todos
not_done_todos = not_done_todos.limit(sanitize(params[:limit])) if params[:limit]
if params[:due]
due_within_when = Time.zone.now + params['due'].to_i.days
due_within_when = Time.zone.now + params[:due].to_i.days
not_done_todos = not_done_todos.where('todos.due <= ?', due_within_when)
end
if params[:tag]
tag = Tag.where(:name => params['tag']).first
tag = Tag.where(:name => params[:tag]).first
not_done_todos = not_done_todos.joins(:taggings).where('taggings.tag_id = ?', tag.id)
end