Module: RailsDb

Defined in:
lib/rails_db.rb,
lib/rails_db/table.rb,
lib/rails_db/engine.rb,
lib/rails_db/result.rb,
lib/rails_db/history.rb,
lib/rails_db/version.rb,
lib/rails_db/database.rb,
lib/rails_db/sql_query.rb,
lib/rails_db/connection.rb,
lib/rails_db/sql_import.rb,
lib/rails_db/table_data.rb,
lib/rails_db/sql_explain.rb,
lib/rails_db/adapters/mysql.rb,
lib/rails_db/rails_db_error.rb,
lib/rails_db/sql_query_data.rb,
lib/rails_db/adapters/sqlite.rb,
lib/rails_db/table_pagination.rb,
lib/rails_db/adapters/postgres.rb,
app/helpers/rails_db/tables_helper.rb,
lib/rails_db/adapters/base_adapter.rb,
app/controllers/rails_db/sql_controller.rb,
app/helpers/rails_db/application_helper.rb,
app/controllers/rails_db/tables_controller.rb,
app/helpers/rails_db/flash_messages_helper.rb,
app/controllers/rails_db/dashboard_controller.rb,
app/controllers/rails_db/application_controller.rb,
app/helpers/rails_db/rails_db_data_table_helper.rb

Defined Under Namespace

Modules: Adapters, ApplicationHelper, Connection, FlashMessagesHelper, RailsDbDataTableHelper, TablePagination, TablesHelper Classes: ApplicationController, DashboardController, Database, Engine, History, RailsDbError, Result, SqlController, SqlExplain, SqlImport, SqlQuery, SqlQueryData, Table, TableData, TablesController

Constant Summary collapse

VERSION =
"0.6"
@@enabled =
true
@@automatic_routes_mount =
true
@@black_list_tables =
[]
@@white_list_tables =
[]
@@http_basic_authentication_enabled =
false
@@http_basic_authentication_user_name =
'rails_db'
@@http_basic_authentication_password =
'password'
@@verify_access_proc =
proc { |controller| true }

Class Method Summary collapse

Class Method Details

.require_relative(path) ⇒ Object

Custom require relative that work with older rubies also



10
11
12
13
# File 'lib/rails_db.rb', line 10

def self.require_relative(path)
  full_path = File.expand_path(path, File.dirname(__FILE__))
  Kernel.require(full_path)
end

.setup {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (RailsDb)

    the object that the method was called on



47
48
49
# File 'lib/rails_db.rb', line 47

def self.setup
  yield(self)
end