Don't understand :: in ActionController::Base

Maybe this should apply to Ruby forums directly, but I’ll try here.

I understand the concept of classes and subclasses thanks to the
excellent “Programming Ruby - The Pragmatic Programmer’s Guide”.
However, I don’t understand what :: signify in terms of inheritance,
parent and child in e.g.

ActionController::Base

Pål Bergström wrote:

Maybe this should apply to Ruby forums directly, but I’ll try here.

I understand the concept of classes and subclasses thanks to the
excellent “Programming Ruby - The Pragmatic Programmer’s Guide”.
However, I don’t understand what :: signify in terms of inheritance,
parent and child in e.g.

ActionController::Base

You’re correct, this is definitely not a question for rails-talk. Take a
look at ruby-talk instead. (Btw, if you actually have read the pickaxe,
may I refer you to chapter 9, starting at page 117?)


Ola B. (http://ola-bini.blogspot.com)
JvYAML, RbYAML, JRuby and Jatha contributor
System Developer, Karolinska Institutet (http://www.ki.se)
OLogix Consulting (http://www.ologix.com)

“Yields falsehood when quined” yields falsehood when quined.

Ola B. wrote:

Pål Bergström wrote:

Maybe this should apply to Ruby forums directly, but I’ll try here.

I understand the concept of classes and subclasses thanks to the
excellent “Programming Ruby - The Pragmatic Programmer’s Guide”.
However, I don’t understand what :: signify in terms of inheritance,
parent and child in e.g.

ActionController::Base

You’re correct, this is definitely not a question for rails-talk. Take a
look at ruby-talk instead. (Btw, if you actually have read the pickaxe,
may I refer you to chapter 9, starting at page 117?)

Definitely was harsh. I thought ActionController::Base was part of RoR
:slight_smile:

I read it on the web with no chapters, so if you could be more specific
I would be very thankful.

Put simply… you have to understand Ruby before you really understand
Rails. David Black’s excellent book Ruby for Rails is a definite read if
you
are having trouble with the concepts.

Don’t take this personally, but there have been a lot of questions
posted to
this list lately that really have more to do with the fundamentals of
the
Ruby language than with the way Rails works. Sometimes the line is
blurry
and it’s hard to tell.

-bph.

On Friday 14 July 2006 13:11, Pål Bergström wrote:

I can’t help Ruby and RoR is so closely related and the documentation
is what it is. Maybe this is why you get a lot of questions about Ruby
here in RoR? The documentation has some things to wish for. Not Ruby
itself. That has been the easy part.

But your problem is with ruby itself.

For what I know a
question in the Ruby forum could give the answer that :: is a RoR thing
and should be answered here. Right?

It’s pretty rare (even in the ruby world) that a framework adds its own
custom operator(s) to a language :slight_smile:
Re-read the relevant parts of the pickaxe – good keywords to look for
are
e.g. “namespace”, “operator”, “modules”

Brian H. wrote:

Put simply… you have to understand Ruby before you really understand
Rails. David Black’s excellent book Ruby for Rails is a definite read if
you
are having trouble with the concepts.

Don’t take this personally, but there have been a lot of questions
posted to
this list lately that really have more to do with the fundamentals of
the
Ruby language than with the way Rails works. Sometimes the line is
blurry
and it’s hard to tell.

-bph.

I understand. Don’t worry Brian. I don’t take it personally. Not the
first time I use a forum and give answers myself. We’re all newbies in
the beginning, and it sometimes takes some patience with the level
people are on. But I always try to give my best to those who ask, no
matter what, and not give non-answers. :slight_smile:

I can’t help Ruby and RoR is so closely related and the documentation is
what it is. Maybe this is why you get a lot of questions about Ruby here
in RoR? The documentation has some things to wish for. Not Ruby itself.
That has been the easy part. But I haven’t read all of it, as I want to
get started as soon as possible by building in RoR and learn as I go
along. That is how I’ve learned other languages. For what I know a
question in the Ruby forum could give the answer that :: is a RoR thing
and should be answered here. Right?

So I’ll pop over to the Ruby forum and ask there. Maybe I’ll see you
there? :slight_smile: