On May 11, 8:52 am, José Ignacio <rails-mailing-l...@andreas-s.net>
wrote:
> Any idea? I think there might be a bug here. I'm using Rails 2.3.2, but
> I get the same behaviour in Rails 2.2.2.

There's some funky stuff with STI that basically boils down to the
fact that if a class hasn't been loaded yet rails doesn't know it
exists (and so doesn't create the correct query).
One way of doing things is to force these classes to be loaded, eg at
the bottom of person.rb put

require_dependency 'customer'
require_dependency 'employee'
require_dependency 'developer'

or something like that.

Fred
--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to