Rails Kiddie Rails Kiddie -4 years ago 87
Ruby Question

Where can I look at the Rails controller high-level superclasses?

I am trying to understand some of the higher level functioning of Rails, using the Rails console. I run

controller.class.superclass.superclass
which gives
ActionController::Base
,
controller.class.superclass.superclass.superclass
which gives
ActionController::Metal
and
controller.class.superclass.superclass.superclass.superclass
gives
AbstractController::Base
.

I have found these in the API documentation.

http://api.rubyonrails.org/classes/AbstractController/Base.html
http://api.rubyonrails.org/classes/ActionController/Metal.html

[can only post two links]

I can add to these simply by declaring the classes again in the console, but is there a way to find the original Ruby code for these and to inspect and edit it in its original file(s)? Just in case I need to know the full contents of these for future.

Answer Source
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download