Class: ActionDispatch::Journey::Formatter::MissingRoute
Do not use. This class is for internal use only.
Relationships & Source Files | |
Inherits: | Object |
Defined in: | actionpack/lib/action_dispatch/journey/formatter.rb |
Class Method Summary
Instance Attribute Summary
- #constraints readonly
- #missing_keys readonly
- #name readonly
- #routes readonly
- #unmatched_keys readonly
Instance Method Summary
Constructor Details
.new(constraints, missing_keys, unmatched_keys, routes, name) ⇒ MissingRoute
# File 'actionpack/lib/action_dispatch/journey/formatter.rb', line 37
def initialize(constraints, missing_keys, unmatched_keys, routes, name) @constraints = constraints @missing_keys = missing_keys @unmatched_keys = unmatched_keys @routes = routes @name = name end
Instance Attribute Details
#constraints (readonly)
[ GitHub ]# File 'actionpack/lib/action_dispatch/journey/formatter.rb', line 35
attr_reader :routes, :name, :constraints, :missing_keys, :unmatched_keys
#missing_keys (readonly)
[ GitHub ]# File 'actionpack/lib/action_dispatch/journey/formatter.rb', line 35
attr_reader :routes, :name, :constraints, :missing_keys, :unmatched_keys
#name (readonly)
[ GitHub ]# File 'actionpack/lib/action_dispatch/journey/formatter.rb', line 35
attr_reader :routes, :name, :constraints, :missing_keys, :unmatched_keys
#routes (readonly)
[ GitHub ]# File 'actionpack/lib/action_dispatch/journey/formatter.rb', line 35
attr_reader :routes, :name, :constraints, :missing_keys, :unmatched_keys
#unmatched_keys (readonly)
[ GitHub ]# File 'actionpack/lib/action_dispatch/journey/formatter.rb', line 35
attr_reader :routes, :name, :constraints, :missing_keys, :unmatched_keys
Instance Method Details
#message
[ GitHub ]# File 'actionpack/lib/action_dispatch/journey/formatter.rb', line 53
def = +"No route matches #{Hash[constraints.sort_by { |k, v| k.to_s }].inspect}" << ", missing required keys: #{missing_keys.sort.inspect}" if missing_keys && !missing_keys.empty? << ", possible unmatched constraints: #{unmatched_keys.sort.inspect}" if unmatched_keys && !unmatched_keys.empty? end
#params
[ GitHub ]# File 'actionpack/lib/action_dispatch/journey/formatter.rb', line 49
def params path("unknown") end
#path(method_name)
# File 'actionpack/lib/action_dispatch/journey/formatter.rb', line 45
def path(method_name) raise ActionController::UrlGenerationError.new(, routes, name, method_name) end