From: Ralph Shnelvar Date: 2009-12-01T00:51:41+09:00 Subject: Re: How does ActiveRecord do it? MH> On Mon, Nov 30, 2009 at 8:02 AM, Ralph Shnelvar wrote: >> Is webrick(?) reloading .\app\models\user.rb every >> time a form is generated? MH> Yes, well it's not webrick doing the reloading, it is Rails, Rails MH> will reload all your models before each request in development mode. MH> Rails configuration API is found here: MH> http://api.rubyonrails.org/classes/Rails/Configuration.html MH> In particular the 'cache_classes', attribute which is configured in MH> the RAILS_ROOT/config/environments/*.rb filles. You can also review MH> the following files for descriptions of the various options: MH> * RAILS_ROOT/config/environment.rb MH> * RAILS_ROOT/config/environments/development.rb MH> * RAILS_ROOT/config/environments/production.rb MH> * RAILS_ROOT/config/environments/test.rb >> Assuming it is reloading .\app\models\user.rb in development mode ... >> will it do this in production mode? MH> 'cache_classes' is set to true by default in MH> RAILS_ROOT/config/environments/production.rb. This disables reloading MH> in production mode. MH> Also, when you're in the rails console, you can manually reload MH> classes by calling 'reload!'. MH> The rails mailing list will be able to provide much more satisfactory MH> answers regarding such items in the future. You should post rails MH> related questions there. The question I was trying to ask was ... What _Ruby_ facility does Rails use to reload the class?