Rails 7 allows setting timestamps on insert_all/upsert_all record creation | Saeloun Blog

18-Jan-2022 1728
ActiveRecord is one of the most useful utilities in the Rails toolkit. It allows us to perform complex database queries while abstracting the adapter, essentially making a database “pluggable”.However, some edge cases stand out like a sore thumb. One such query is the ability to set values to the standard Rails timestamps which are available across models. Namely, created_at, created_on, updated_at, updated_on.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle