instance method
current_database
Ruby on Rails 3.2.22.5
Since v2.2.3 Last seen in v3.2.22.5Signature
current_database()
Returns the current database name.
Source
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 861
def current_database
query('select current_database()', 'SCHEMA')[0][0]
end
Defined in activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb line 861
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::PostgreSQLAdapter