Class: Gems::Index

Inherits:
ApplicationView
  • Object
show all
Defined in:
app/views/rails_devtools/gems/index.rb

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Index.



5
6
7
8
# File 'app/views/rails_devtools/gems/index.rb', line 5

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

Instance Method Details

#view_templateObject



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

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