bramski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jan-17 00:04 UTC
Models and Modules and subclassing, oh my!
So, our application has a large number of models at this point, and I''m
getting a bit worried about people having to use long names, as well as
clashes in the global namespace. More recently I wanted to add a new
table with some STI subclasses of that table...
module Portal
end
class Portal::Base < ActiveRecord::Base
belongs_to :widget
end
However, Widget is a top level class, Object::Widget.
What I find is that this generates an error, Portal::Widget
(portal/widget.rb) could not be found. Is this a problem with the way
ruby or rails is attempting to load this class under the module? I
suppose that it is ambiguous, did I mean Portal::Widget or
Object::Widget, but the ambiguity should be able to be resolved by the
fact that Portal::Widget doesn''t exist, but Object::Widget does.
Has anyone dealt with this before?
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
