Forum: Ruby on Rails ActiveRecord::Base -> what does it mean?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
1dddc4b6c57e369dab7ad1d2e262dab7?d=identicon&s=25 tivrfoa (Guest)
on 2009-06-09 17:46
(Received via mailing list)
Hi folks!

I just want to know the name of the relationship between ActiveRecord
and Base.

Thanks!!!
8f6f95c4bd64d5f10dfddfdcd03c19d6?d=identicon&s=25 Rick Denatale (rdenatale)
on 2009-06-09 18:04
(Received via mailing list)
On Tue, Jun 9, 2009 at 11:45 AM, tivrfoa<lescoutinhovr@gmail.com> wrote:
>
> Hi folks!
>
> I just want to know the name of the relationship between ActiveRecord
> and Base.
>
> Thanks!!!

ActiveRecord is a global which refers to a Ruby module. One of the
functions of a module in Ruby is to define a name space.

ActiveRecord::Base is a constant defined in the ActiveRecord name
space, which happens to refer to a class.

Name spacing allows for the existence of, and distinction between say:

   ActiveRecord::Base
vs
   ActionController::Base
vs
   ActionView::Base

etc.



--
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale
1dddc4b6c57e369dab7ad1d2e262dab7?d=identicon&s=25 tivrfoa (Guest)
on 2009-06-09 20:18
(Received via mailing list)
Thanks a lot Rick!
This topic is locked and can not be replied to.