#193 Tableless Model
Dec 21, 2009 | 8 minutes | Active Record
If you want to create a model without a database backend, you simply need to define a couple methods in the model like I show in this episode.
- Download:
- source codeProject Files in Zip (95.9 KB)
- mp4Full Size H.264 Video (14.7 MB)
- m4vSmaller H.264 Video (9.38 MB)
- webmFull Size VP8 Video (22.8 MB)
- ogvFull Size Theora Video (18.5 MB)
Form Objects
Models have a tendency to become a complex mess as an application grows. In this episode you will learn a couple of techniques to extract form-behavior out into its own class.
(18 minutes)
Model Caching (revised)
Caching at a low level is a great option when the view is too dynamic to cache and you need something flexible that can work anywhere in the application. Here I show a variety of ways to use Rails.cache with Active Record.
(12 minutes)
Fast Tests
A slow test suite can put a damper on test-driven development. In this episode I show a variety of ways to optimize specs including: selective testing, preloading Rails, and testing outside of Rails.
(17 minutes)
Fast Rails Commands
Rails commands, such as generators, migrations, and tests, have a tendency to be slow because they need to load the Rails app each time. Here I show three tools to make this faster: Zeus, Spring, and Commands.
(8 minutes)
Ember Part 2
Here we continue our look into Ember.js. First we add a JSON API to persist the entries through ember-data. Then we finish up the project by adding a computed property and a view object.
(14 minutes)