Namespaced models

I’d like one of my AR models to have a subclass. I’d like that
subclass to live in a folder that is named the same as the model. For

models/person.rb (AR model with behaviour)
models/person/processor.rb (class Person::Processor)

Am I right in thinking that this isn’t possible? My tests seem to
indicate that it isn’t.


Ok, so this is possible.

At the bottom of the AR model file, use require_or_load for each of
the files in the subfolder.

class Person < ActiveRecord::Base; end
require_or_load File.dirname(FILE) + ‘/person/processor.rb’


On 8/22/06, Chris R. [email protected] wrote:

indicate that it isn’t.
This works on edge.