Autoload Models in Subdirectories in Edge Rails

If you have models in subdirectories in your Rails app (i.e. app/models/billing/, app/models/observers/, etc), you need to add this line to your environment.rb if you upgrade to Edge Rails:

  config.autoload_paths += Dir[RAILS_ROOT + '/app/models/*/']

Via: I.NFECTIO.US

You can Bookmark this entry on del.icio.usbookmark this, digg this entrydigg this or check the See this page in technoraticosmos

Shanti A. Braford blogs here.

If you really want to know, just read this.



  

Powered by FeedBlitz