Hi folks!
I just want to know the name of the relationship between ActiveRecord
and Base.
Thanks!!!
Hi folks!
I just want to know the name of the relationship between ActiveRecord
and Base.
Thanks!!!
On Tue, Jun 9, 2009 at 11:45 AM, tivrfoa[email protected] 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
Thanks a lot Rick!
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs