Released: Sep 17, 2009, Running time: 51 min
In this episode:
Finishing out the remaining RESTful actions – edit, update and destroy – for the Brand resource.
Add to cart$5.00Released: Sep 17, 2009, Running time: 51 min
In this episode:
Finishing out the remaining RESTful actions – edit, update and destroy – for the Brand resource.
Add to cart$5.00We created the Brand model and added the new action in Episode 3 and the create action in Episode 4.
In this episode we add the edit, update and destroy actions to the BrandsController following the red-green cycle, finishing the Brand resource.
For easier specifying of our Brand model, we use the remarkable_rails gem. It provides you with a nice DSL for specifying columns, associations and even validations for your model.
2 comments
takaaki
over 3 years ago
Why don’t you guys use “#all” method instead of "#find(:all)? Just writing “all” saves a little time.
Istvan Hoka
over 3 years ago
In reply to takaaki
Why don’t you guys use “#all” method instead of "#find(:all)? Just writing “all” saves a little time.
Just a habit really, from the days when we did not have named scopes.
Using “all” instead of “find(:all)” would also make it easier to spec, in addition to saving some keystrokes.