On Oct 16, 10:27 am, Florian Dütsch <[EMAIL PROTECTED]>
wrote:
> Let's start with an example:
>
>
> Additionally the following warning arises in the logs:
> .../vendor/rails/activerecord/lib/active_record/base.rb:1910: warning:
> toplevel constant Comment referenced by Review::Comment
>
> Ok, so class_eval("::Review::Comment") in "compute_type" returns the
> toplevel constant "Comment", the wrong class!
>
> Does anybody know why?
> Is it a bug?
>
There's some funkyness to do with the automatic loading and namespaces
(see
http://groups.google.com/group/rubyonrails-core/browse_thread/thread/17e9e5e564e8ea64/def2cec288984fa3?lnk=gst&q=const_missing#def2cec288984fa3)
You may be able to sidestep this by just using require_dependency to
require stuff ahead of time

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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to