This episode will show you how to debug a rails app using the "debugger" gem: set a breakpoint, inspect variables and change the executed code at runtime.
bundle
rails s
# in debugger
help
help list
list
next
pp @today_tasks
pp @today_tasks.map(&:due_at)
step
l
n
pp range
irb
continue
# in irb
puts where(due_at: range).to_sql
date.to_time
date.to_time_in_current_zone
range = date.beginning_of_day..date.end_of_day
exit