Hi all !
I am extracting chunks of code into engines from an existing app. One
model I’m extracting is Recipient.
I followed the LoginEngine convention:
class Recipient < AR::Base
base.send :include, XlPop::Recipient::InstanceMethods
base.send :extend, XlPop::Recipient::ClassMethods
module ClassMethods ... end module InstanceMethods ... end
The other models I extracted worked correctly, but loading Recipient
$ ruby script\console
Loading development environment.
`const_missing’:NameError: uninitialized constant Recipient
I added some code to
vendor/rails/activesupport/lib/active_support/dependencies.rb to show
me what files were loaded and the load path at that time. I noticed
that vendor/plugins/xl_pop/app/models is NOT in the load path. Is
that to be expected ?
I did try creating my model in app/models, and it works. So, I am
inclined to think the missing models directory in the load path is the
Thanks all !