Class: TimecopWeb::MainController

Inherits:
ApplicationController show all
Defined in:
app/controllers/timecop_web/main_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
# File 'app/controllers/timecop_web/main_controller.rb', line 5

def index
end

#travelObject



8
9
10
11
12
13
14
15
16
# File 'app/controllers/timecop_web/main_controller.rb', line 8

def travel
  case params[:commit]
  when "travel" then Timecop.travel(move_at)
  when "freeze" then Timecop.freeze(move_at)
  else Timecop.return
  end

  redirect_to root_path
end