Class: DatabaseTables::Index

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Index.



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

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

Instance Method Details

#view_templateObject



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

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