If you had an OrdersController
, could you define the class like this?
class OrdersController < ActionController::Base
# stuff
end
When I generate a Rails scaffold, the only place this seems to be defined is in the ApplicationController(application_controller.rb)
, the other controllers created by me have something along the lines of
class OrdersController < ApplicationController
# stuff
end
Is it correct to use the first one? In which case? I can't seem to find a good answer to this.