search for: wackinator

Displaying 1 result from an estimated 1 matches for "wackinator".

2008 Mar 07
6
creating a model registry
Hi all, This is a problem I''ve approached so many times and always worked around, that now I want to solve it once and for all. Say I have something like this: --- class X < ActiveRecord::Base acts_as_wacky end module Wackinator class ControlAllWackos @@wackos = [] def self.kill_wackos @@wackos.each(&:kill) end end def acts_as_wacky ControlAllWackos.wackos << self # do stuff end end --- I know that code won''t actually run, but hopefully it serves to illustrate my point...