action_tracker_test_helper.rb 277 Bytes Edit Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 class User def self.current Thread.current[:current_user] || User.first end end module ActionTracker class Record def back_in_time(time = 25.hours) self.updated_at = Time.now.ago(time) self.send :update_without_callbacks self end end end