ApplicationController.included_modules
ApplicationController.ancestors - ApplicationController.included_modules
HelpsController.action(:index) #=> returns a proc rack application - plus the line of the source code metal.rb:230 #Proc:0x007fcfad287a38@/Users/jongutwillig/.rvm/gems/ruby-2.1.1@global/gems/actionpack-4.1.0/lib/action_controller/metal.rb:230 HelpsController.method(:action).source_location #=> where it is defined ["/Users/jongutwillig/.rvm/gems/ruby-2.1.1@global/gems/actionpack-4.1.0/lib/action_controller/metal.rb", 229]
There are TWO MIDDLEWARE STACKS ! - one for the app - one for controller lookup
in a controller use Rack::ShowExceptions, only: :show #=> uses the rack show exceptions middleware instead of Rails exceptions
rake middleware