ActiveRecord Models: Validations & Associations
Last week we scaffolded a simple chat application. If you missed it, don't worry, we'll get you up and running quickly.
This week we'll be diving into the data layer of our application, exploring how our models are declared, represented, and connected to each other. We'll add some validations to our models to ensure that we don't allow bad data, and will play around with the rails console, a way to interactively explore our data.
Since the code we'll be working with is in ruby, try out the Codewars challenge to get a simple feel for what ruby looks like.
Be sure to complete the following Codewars challenge before class!
(If your RailsSchool profile includes your Codewars username, you'll get
a nifty star if you complete the challenge.)