/ 20.Feb.2006
Some development tidbits for the day…
- SwitchTower 1.0 is out. Includes extension libraries, new tasks, and set now accepts a block as argument. The restart_via variable has been changed to use_sudo which requires updating your deploy.rb.
- Snook has posted a Prototype desktop cheat sheet in various resolutions, sizes, and colors.
- If you use act_as_list in your ActiveRecord model with single table inheritance (STI), you can scope the list by type by calling acts_as_list without the scope argument in the super’s inherited class method:
class Category < ActiveRecord::Base
validates_presence_of :name
def self.inherited(sub)
sub.acts_as_list
end
end
- When using STI, if you want to keep all of your subsclasses in the same source file as the super, add model :your_super_class to ApplicationController. This will prevent errors if Rails tries to load a subclass before your superclass.
micro theme by seaofclouds, and powered with Mephisto
1 Comment
Leave a Comment