Use Timecop in Rails web app to travel time on your browser

Time manipulation is required to check time-related behavior

Online English Conversation etc. If you want to check the screen that says "Lessons will start at that time after booking a lesson for the teacher" It can be used in cases where you want to check the behavior.

Time cop is good for time travel in rails.

# 2020/11/11 Move at 21:00
Timecop.travel(Time.zone.parse('2020/11/11 21:00:00'))

I want to jump to the time specified by the operation on the browser

There is also a warm debugging work to write the above description on the controller each time, It is easy to be able to operate on the browser in the case of develop mode.

demo

Sample source code

https://github.com/umeyuki/rails-timetraveler-sample

Recommended Posts

Use Timecop in Rails web app to travel time on your browser
Use pagy for pagination in your Rails app.
How to deploy jQuery in your Rails app using Webpacker
How to use Ruby on Rails
Deploy your Rails app on Heroku
How to change app name in rails
How to use custom helpers in rails
[Ruby on Rails] How to use CarrierWave
How to use MySQL in Rails tutorial
[Ruby on Rails] How to use redirect_to
[Ruby on Rails] How to use kaminari
How to use credentials.yml.enc introduced in Rails 5.2
Which class should I use to get the date and time in my Rails app (Time, DateTime, TimeWithZone)
[Rails] How to use select boxes in Ransack
How to use JQuery in js.erb of Rails6
[Ruby on Rails] How to install Bootstrap in Rails
Unify the Rails app time zone to Japan time
[Ruby on Rails] How to use session method
[Rails] How to use PostgreSQL in Vagrant environment
How to check the WEB application created in the PC development environment on your smartphone
How to set the display time to Japan time in Rails
[Ruby on Rails] How to write enum in Japanese
Use Extend (Concerns) in Rails to standardize Controller processing.
Change date and time to Japanese notation in Rails
[Updated from time to time] Ruby on Rails Convenient methods
I want to use a little icon in Rails
[Ruby On Rails] How to reset DB in Heroku
[Swift] Use UserDefaults to save data in the app
Beginners use ubuntu in windows to prepare rails environment
Notes on how to use regular expressions in Java
Use images in Rails
What to do when Rails on Docker does not reflect controller changes in the browser
[Rails] Settings for loading web fonts in CloudFront on Heroku
[Ruby on Rails] Quickly display the page title in the browser
Use Java Web Start in an OpenJDK environment on Windows
How to display a graph in Ruby on Rails (LazyHighChart)
Confirm public key ~ Register key on Github ~ Push Rails app to Github
Apply CSS to a specific View in Ruby on Rails
Use your own classes in the lib directory with Rails6
[Ruby on Rails 5] Use WorkMail to set an email address for your own domain. [Work Mail]
How to use Rails Current Attributes to track nginx (web server) and unicorn (app server) logs with X-Request-ID
[Rails] How to use enum
[Rails] How to use enum
How to use rails join
[Rails] How to use validation
[Rails] How to use authenticate_user!
[Rails] How to use "kaminari"
Use multiple checkboxes in Rails6!
[Rails] How to use Scope
[Rails] A simple way to implement a self-introduction function in your profile
React.js CSS in Rails app deployed on EC2 cannot be loaded
Redirect to your own domain with rack-rewrite on Heroku x Rails
[Ruby on Rails] "|| =" ← Summary of how to use this assignment operator
Steps to install Maven on Mac and use it in Eclipse
[Ruby on Rails] Use the resources method to automatically create routes.
Things to remember and concepts in the Ruby on Rails tutorial
How to get JDK 11 on your mac in a comfortable way
[Ruby on Rails] How to log in with only your name and password using the gem devise
[Ruby on Rails] When logging in for the first time ・ How to split the screen in half using jQuery