Class: RailsDevtools::Routes::Index

Inherits:
ApplicationView show all
Defined in:
app/views/rails_devtools/routes/index.rb

Instance Method Summary collapse

Methods inherited from Components::ApplicationComponent

#before_template

Constructor Details

#initialize(form: nil, routes: []) ⇒ Index

Returns a new instance of Index.



6
7
8
9
# File 'app/views/rails_devtools/routes/index.rb', line 6

def initialize(form: nil, routes: [])
  @routes = routes
  @form = form
end

Instance Method Details

#view_templateObject



11
12
13
14
15
16
17
# File 'app/views/rails_devtools/routes/index.rb', line 11

def view_template
  render Components::PageContent.new do |page|
    page.page_title { "Routes" }
    page.search_form(form: @form, path: helpers.routes_path, method: :get)
    page.results { results }
  end
end