Pretty simple chapter. Got through it within an hour. After working on CakePHP there is quite a bit of similarities between the two MVC frameworks. Glad I got some work in on CakePHP to prepare me for this.
OK spoke too soon. Failed to upload the db to heroku through the given command line call. Ohh well not a interesting example anyways. Funny thing in the book it wrote that if you can understand the scaffolding you probably shouldn’t be reading the book. I thought the scaffold code makes sense maybe I can skip some sections then.
Also an error with Rails 4.0 it doesn’t use the attr_accessible anymore so it seems the book’s way of doing validation is old. From this blog is seems the controller can do the validation from within it now. It can access the attributes without declaring them in the Model which is nice. I thought that was a bit superfluous but could see that it’s probably a security thing I guess.
For example they both something to describe the relationship.
For User, hasMany microposts.
Microposts belongs_to Users