Method: ActionDispatch::Routing::ConsoleFormatter::Base#no_routes

Defined in:
actionpack/lib/action_dispatch/routing/inspector.rb

#no_routes(routes, filter) ⇒ Object



174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# File 'actionpack/lib/action_dispatch/routing/inspector.rb', line 174

def no_routes(routes, filter)
  @buffer <<
    if routes.none?
      "        You don't have any routes defined!\n\n        Please add some routes in config/routes.rb.\n      MESSAGE\n    elsif filter.key?(:controller)\n      \"No routes were found for this controller.\"\n    elsif filter.key?(:grep)\n      \"No routes were found for this grep pattern.\"\n    end\n\n  @buffer << \"For more information about routes, see the Rails guide: https://guides.rubyonrails.org/routing.html.\"\nend\n"