We found that to complete this work, we needed both a zeta solution and some additional code (at least in Rails 3.0.9). For the above problem, the solution would look something like this:
In config / environment / development.rb:
config.after_initialize do ["vehicle"].each do|dep| require_dependency( (Rails.root + "app/models/#{dep}").to_s ) end end
In application / controllers / application_controller.rb:
class ApplicationController < ActionController::Base if Rails.env == 'development' require_dependency( (Rails.root + "app/models/vehicle").to_s ) end ...
The code in development.rb handles the bootstrap of the class, and the code in ApplicationController handles subsequent requests.
source share