In edge you have a config/initializers folder to avoid putting stuff in your environment.rb file.
I don't know if that would solve your problem but that's what you will have to do in 2.0 Regarding the constants, put them where they make sense. If you need to use them often in a model, maybe they should be in your model. Matt On 7/24/07, Glenn Little <[EMAIL PROTECTED]> wrote: > > I typically define my global constants in environment.rb at the > bottom. However, I've got a situation where I've got a > > config.active_record.observers > > call earlier on in the Rails::Initializer.run loop (of environment.rb) > > That observer config call pokes one of my models. That model > uses some of my constants in validate_* calls. The problem is, > at the time that model code gets poked, the constants are not > yet defined. > > Is there some other "standard" place to define constants? I have > tried just stuffing the definitions inside the Initializer.run > loop (and before the observer config), and that does avoid the > error. But is there a better place than that? I like sticking > with the conventions and standards when at all possible. > > Maybe I'll just define all my local constants at the top of the file > instead > and be done with it. Any reason that I'm missing that makes that > a bad idea? > > Thanks. > > -glenn > _______________________________________________ > Sdruby mailing list > [email protected] > http://lists.sdruby.com/mailman/listinfo/sdruby > -- m|a agile development -------- (760) 536-4425 Skype: mattdesktop GTalk: [EMAIL PROTECTED] blog: http://railsontherun.com
_______________________________________________ Sdruby mailing list [email protected] http://lists.sdruby.com/mailman/listinfo/sdruby
