module Rails::ConsoleMethods

def controller

This method assumes an +ApplicationController+ exists, and that it extends ActionController::Base.

Gets a new instance of a controller object.
def controller
  @controller ||= ApplicationController.new
end