Where is ActionController::Base?


As I’m reading Ruby on Rails now, I want to ask about ApplicationController, that we find in application_controller.rb like the following:

class ApplicationController < ActionController::Base
  # Prevent CSRF attacks by raising an exception.
  # For APIs, you may want to use :null_session instead.
  protect_from_forgery with: :exception

is that a big Class in Rails ? if yes, how can I get a look ? just for curiosity.

Thanks for your help.

Hi there,

well the most easiest way would to look for it on github
(Seems I’m not allowed to post any link :rolling_eyes:)

Another way is to use the command bundle open rails and navigate to the specific file.
But this requires that you’ve set up your editor. If you use vim and use the NerdCommenter plugin this command can be extremely helpful when trying to understand code from gems in your Gemfile.

For everybody new to vim i can really recommend the janus vim distribution, just look for it on github.
(I can’t put two links into a reply)

1 Like

Thanks @maxkerp for your reply, but I’m using by the way Cloud9 for all my Ruby on Rails experiences. By the way, I’m publishing also my experience on the begin from here website.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.