- default_scope will initialize values for new models, but then that will become the scope on which you find the model. If you just want to initialize some numbers to 0 then this is not what you want.
- Defining defaults in your migration also works part of the time… As has already been mentioned this will not work when you just call Model.new.
- Overriding initialize can work, but don’t forget to call super!
- Using a plugin like phusion’s is getting a bit ridiculous. This is ruby, do we really need a plugin just to initialize some default values?
- Overriding after_initialize is deprecated as of Rails 3. When I override after_initialize in rails 3.0.3 I get the following warning in the console: