In this conclusion to a five-part series that delves into the Rails framework's Active Record, you'll finish learning about validations, and take a look at callbacks. This article is excerpted from chapter five of the book Beginning Rails: From Novice to Professional, written by Jeffrey Allan Hardy, Cloves Carneiro Jr. and Hampton Catlin (Apress; ISBN: 1590596862).
Callbacks and the Active Record - Reviewing the Updated Models (Page 4 of 5 )
We’ve made a lot of changes to our models, so let’s make sure we’re on the same page before we move on. First, take a look at the Event model in Listing 5-27 and make sure that yours matches.
Listing 5-27. Current Event Model, in /app/models/event.rb