Freedom Dumlao on 2 Feb 2007 13:47:41 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PhillyOnRails] Elegant Reload of Custom Models



On Feb 1, 2007, at 5:44 PM, Keith Fitzgerald wrote:

Hi All -

I'm a newbie [hopefully I'll meet some of you at the 2/19 pub night] and I'm wondering if there is an elegant way to reload custom models. It seems like all the solutions on the web are a bit hacked.
Any thoughts?


Keith

Hi Keith,

I'm new on the list too, and certainly wouldn't call myself a Rails expert, but I believe models are only loaded once: when the application starts. So the only way I know of to do this is to restart your application. Depending on your server setup there are different ways of doing this. For example on Apache/mod_fastcgi you can simply:

$> touch ./public/dispatch.fcgi


to get the application restarted and the models re-loaded. Of course this will restart all of your fcgi processes too, so the next person too your site will have to wait a bit longer for a response than usual.

Freedom

_______________________________________________
To unsubscribe or change your settings, visit:
http://lists.phillyonrails.org/mailman/listinfo/talk