Select Page

Active Record Tutorials

Rails: Understanding save vs. save! Difference

Rails: Understanding save vs. save! Difference

When working with Ruby on Rails, you may find yourself needing to save a model instance to the database. Two methods used to accomplish this task are save and save!. While both methods save a record to the database, they behave differently when an error occurs during...

Deleting Associated Records in Ruby on Rails

Deleting Associated Records in Ruby on Rails

Ruby on Rails provides a lot of powerful tools for working with associations between models. One common use case is to delete associated records when a parent record is destroyed. In this blog post, we'll explore how to delete a guest record when a reservation record...