Fearless Fool wrote in post #996869:
> So my next approach will be some magick with const_defined? -- this time
> for sure!!!  ;)

I tried that and now I'm really confused.  @Fred: would you expect it to
be the case that:

  class MeteredService < ActiveRecord::Base ; end
  class PGEBusiness < MeteredService ; end

  Object.const_defined?("PGEBusiness") => true
yet
  MeteredService.descendants => []
?

That is, the system still knows about the class PGEBusiness, but it
doesn't show up as a descendant of MeteredService?  That is, in fact,
what I'm seeing.

More to the point, how can I tell when I need to reload the subclasses?
(And if require_dependencies is the answer, how to I avoid the
superclass mismatch error that I'm seeing?)

(Feh.  Maybe I should just start running in production mode.)

TIA.

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to