instance method
extension_enabled?
Ruby on Rails 4.1.16
Since v4.0.13Signature
extension_enabled?(name)
No documentation comment.
Parameters
-
namereq
Source
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 674
def extension_enabled?(name)
if supports_extensions?
res = exec_query "SELECT EXISTS(SELECT * FROM pg_available_extensions WHERE name = '#{name}' AND installed_version IS NOT NULL) as enabled",
'SCHEMA'
res.column_types['enabled'].type_cast res.rows.first.first
end
end
Defined in activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb line 674
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::PostgreSQLAdapter