Class: Railstar::GeneralController

Inherits:
ApplicationController show all
Defined in:
app/controllers/railstar/general_controller.rb

Instance Method Summary collapse

Instance Method Details

#codeObject



17
18
19
# File 'app/controllers/railstar/general_controller.rb', line 17

def code
  @codes = C.codes
end

#databaseObject



9
10
11
12
13
14
15
# File 'app/controllers/railstar/general_controller.rb', line 9

def database
  @connection = ActiveRecord::Base.connection
  @tables = @connection.tables.sort
  @tables.delete "schema_migrations"

  @cols = %w(name human_name sql_type klass default type null)
end

#indexObject



6
7
# File 'app/controllers/railstar/general_controller.rb', line 6

def index
end

#routesObject



21
22
23
24
# File 'app/controllers/railstar/general_controller.rb', line 21

def routes
  Rails.application.reload_routes!
  @routes = Rails.application.routes.routes
end