Class: RailsDbInfo::TablesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/rails_db_info/tables_controller.rb

Instance Method Summary collapse

Instance Method Details

#entriesObject



16
17
18
19
# File 'app/controllers/rails_db_info/tables_controller.rb', line 16

def entries
  @table = RailsDbInfo::Table.new(params[:table_id])
  @entries = RailsDbInfo::TableEntries.new(@table).paginate(:page => params[:page])
end

#indexObject



8
9
10
# File 'app/controllers/rails_db_info/tables_controller.rb', line 8

def index
  @tables = ActiveRecord::Base.connection.tables.sort
end

#showObject



12
13
14
# File 'app/controllers/rails_db_info/tables_controller.rb', line 12

def show
  @table = RailsDbInfo::Table.new(params[:id])
end