Skip to content

Instantly share code, notes, and snippets.

@bradediger
Created March 29, 2011 16:03
Show Gist options
  • Select an option

  • Save bradediger/892640 to your computer and use it in GitHub Desktop.

Select an option

Save bradediger/892640 to your computer and use it in GitHub Desktop.
require 'timecop'
class ApplicationController < ActionController::Base
around_filter :its_sunday_morning
def its_sunday_morning
Timecop.travel(Time.parse("Sun Mar 27 09:01:00 -0400 2011")) { yield }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment