module ActionDispatch
module Routing
class RouteSet
def dispatcher(defaults)
Routing::RouteSet::Dispatcher.new(defaults)
end
end
end
end
dispatcher?
serve
prepare_params!
controller
dispatch
controller_reference
normalize_controller!
merge_default_action!
def dispatch(controller, action, env)
controller.action(action).call(env)
end
AppName::Application.routes.draw do
get 'photos/:id' => 'photos#show', :defaults => { :format => 'jpg' }
end
app: #<ActionDispatch::Routing::RouteSet::Dispatcher:0x007fd05e0cf7e8
@defaults={:format=>"jpg", :controller=>"photos", :action=>"show"},
@glob_param=nil,
@controller_class_names=#<ThreadSafe::Cache:0x007fd05e0cf7c0
@backend={},
@default_proc=nil>>
conditions: {:path_info => "/photos/:id(.:format)",
:required_defaults => [:controller, :action],
:request_method => ["GET"]}
requirements: {}
defaults: {:format=>"jpg", :controller=>"photos", :action=>"show"}
as: nil
anchor: true