Skip to content

Instantly share code, notes, and snippets.

View pichotweb's full-sized avatar

Ivan Joaquim pichotweb

View GitHub Profile
@signaes
signaes / Rails Console time travel
Created February 18, 2020 22:29
Using active support time helpers to change the current date in the rails console
require 'active_support/testing/time_helpers'
# the class below could have any name
class Tempo
include ActiveSupport::Testing::TimeHelpers
end
# any desidered date
desired_date = Date.today - 2.days