Class: ActionDispatch::Journey::Formatter::MissingRoute
- Defined in:
 - actionpack/lib/action_dispatch/journey/formatter.rb
 
Instance Attribute Summary collapse
- 
  
    
      #constraints  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute constraints.
 - 
  
    
      #missing_keys  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute missing_keys.
 - 
  
    
      #name  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute name.
 - 
  
    
      #routes  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute routes.
 - 
  
    
      #unmatched_keys  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute unmatched_keys.
 
Instance Method Summary collapse
- 
  
    
      #initialize(constraints, missing_keys, unmatched_keys, routes, name)  ⇒ MissingRoute 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of MissingRoute.
 - #message ⇒ Object
 - #params ⇒ Object
 - #path(method_name) ⇒ Object
 
Constructor Details
#initialize(constraints, missing_keys, unmatched_keys, routes, name) ⇒ MissingRoute
Returns a new instance of MissingRoute.
      37 38 39 40 41 42 43  | 
    
      # 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 ⇒ Object (readonly)
Returns the value of attribute constraints.
      35 36 37  | 
    
      # File 'actionpack/lib/action_dispatch/journey/formatter.rb', line 35 def constraints @constraints end  | 
  
#missing_keys ⇒ Object (readonly)
Returns the value of attribute missing_keys.
      35 36 37  | 
    
      # File 'actionpack/lib/action_dispatch/journey/formatter.rb', line 35 def missing_keys @missing_keys end  | 
  
#name ⇒ Object (readonly)
Returns the value of attribute name.
      35 36 37  | 
    
      # File 'actionpack/lib/action_dispatch/journey/formatter.rb', line 35 def name @name end  | 
  
#routes ⇒ Object (readonly)
Returns the value of attribute routes.
      35 36 37  | 
    
      # File 'actionpack/lib/action_dispatch/journey/formatter.rb', line 35 def routes @routes end  | 
  
#unmatched_keys ⇒ Object (readonly)
Returns the value of attribute unmatched_keys.
      35 36 37  | 
    
      # File 'actionpack/lib/action_dispatch/journey/formatter.rb', line 35 def unmatched_keys @unmatched_keys end  | 
  
Instance Method Details
#message ⇒ Object
      53 54 55 56 57 58  | 
    
      # 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 ⇒ Object
      49 50 51  | 
    
      # File 'actionpack/lib/action_dispatch/journey/formatter.rb', line 49 def params path("unknown") end  | 
  
#path(method_name) ⇒ Object
      45 46 47  | 
    
      # File 'actionpack/lib/action_dispatch/journey/formatter.rb', line 45 def path(method_name) raise ActionController::UrlGenerationError.new(, routes, name, method_name) end  |