to KIS I have two models: Reservations and Containers.
Container
has_many :reservations
Reservation
belongs_to :container
When I update a reservation I also want to perform call backs on the respective Container.
What is a good way to do this?
Should I be using nested rest routes, put the container logic in the Reservation model, or something else
Rails has an option called
touch.Rails updates the
updated_atfield of theContainerobject when everReservationobject changes. If you have any callbacks inContainerclass they will be invoked whenReservationobject changes.