Pulling It All Together
Learn how to put Ruby's logic and structures together.
We'll cover the following...
We'll cover the following...
Demonstration of ruby and rails features
Let’s look at an example of how Rails applies a number of Ruby features together to make the code we need to maintain more declarative. For now, we’ll focus on the Ruby-language aspects of the example:
Note: Even if you didn’t know any Ruby, you’d probably be able to decipher that this code creates a table named “products”. The fields defined when this table is created include
title, ...