Julie,
yes, there is always a trade-off between convenience and performance;
having said that, the overhead is not great.
I'm not sure what you mean by "load model from database"; do you mean
the Ruby code describing the model is stored in a database or that you
want to load instances of a model (records) from a database?
If the Ruby code is in a database you need to change the definition of
auto_load in autocode/lib/autocode.rb. Instead of Kernel.load(path)
you will need to read in the model definition code from your database
and "eval" that in the correct context to have it defined.
If (more likely?) you mean to autoload instances of a model, that's
not the point of autoload. Autoload will load in the classes that
define your model, so you can simply say (for instance) "User.first"
and the correct definition of User will be found, loaded and executed.
Does that help?
Jerry
--
You received this message because you are subscribed to the Google Groups "rubywaves" group.
To post to this group, send email to
ruby...@googlegroups.com.
To unsubscribe from this group, send email to
rubywaves+...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubywaves?hl=en.