Hi Aaron,

The file is in the same directory, in the standard path of app/models:

[EMAIL PROTECTED]:models]$ ls -lF
total 144K
drwxr-xr-x  3 nwiger sysadm 4.0K Nov 16 11:56 component_type/
-rw-r--r--  1 nwiger sysadm 1.8K Nov 16 12:19 component_type.rb
-rw-r--r--  1 nwiger sysadm   92 Nov 15 16:43 service_type.rb

[EMAIL PROTECTED]:models]$ ls -lF component_type/
total 12K
-rw-r--r--  1 nwiger sysadm  161 Nov 16 11:56 medius.rb
-rw-r--r--  1 nwiger sysadm  333 Nov 15 15:22 svo.rb

I don't actually mess with LOAD_PATH at all, I'm just using the
standard app/models and app/controllers paths.

I tried experimenting some more, even flattening the structure to
eliminate the subdir (and hence a level of ::'s). However, this did not
affect it at all. It appears that a subclass does not get any
superclass's constants loaded.

I think the problem is this section in const_missing in:
   vendor/rails/activesupport/lib/active_support/dependencies.rb:466

      rescue NameError => e
        # Make sure that the name we are missing is the one that caused
the error
        parent_qualified_name = Dependencies.qualified_name_for parent,
class_id
        raise unless e.missing_name? parent_qualified_name
        qualified_name = Dependencies.qualified_name_for self, class_id
        raise NameError.new("uninitialized constant
#{qualified_name}").copy_blame!(e)
      end


It appears that for subclasses, this does not properly identify the
constant as being the correct one, since the base class name does not
match.

Any ideas how to fix this properly?


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Ruby on Rails: Core" 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-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to