On 4/4/06, Pete Yandell <[EMAIL PROTECTED]> wrote: > Let me sharpen up my first question, because I think it's essential > no matter how you approach this: > > If I have a class that includes Reloadable, how can I declare a class > variable (or equivalent thereof) that persists across reloads of the > class? >
Short answer? You can't. We use the following: class Foo < ActiveRecord::Base cattr_accessor :something @something="default which makes sense for development and test" end With the defaults overriden in production.rb. I think the simplest solution would be to add something like config.after_initialize which gets called after the reset_application! method? Would that be enough for you? -- Cheers Koz _______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core