Methods
Class Public methods
new(view)
Source:
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 235
def initialize(view)
@view = view
@buffer = []
end
Instance Public methods
header(routes)
The header is part of the HTML page, so we don't construct it here.
Source:
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 249
def header(routes)
end
no_routes(*)
Source:
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 252
def no_routes(*)
@buffer << <<~MESSAGE
<p>You don't have any routes defined!</p>
<ul>
<li>Please add some routes in <tt>config/routes.rb</tt>.</li>
<li>
For more information about routes, please see the Rails guide
<a href="https://guides.rubyonrails.org/routing.html">Rails Routing from the Outside In</a>.
</li>
</ul>
MESSAGE
end
result()
Source:
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 265
def result
@view.raw @view.render(layout: "routes/table") {
@view.raw @buffer.join("\n")
}
end