Class: Textacular::PostgresModuleInstaller

Inherits:
Object
  • Object
show all
Defined in:
lib/textacular/postgres_module_installer.rb

Instance Method Summary collapse

Instance Method Details

#db_nameObject



13
14
15
# File 'lib/textacular/postgres_module_installer.rb', line 13

def db_name
  @db_name ||= ActiveRecord::Base.connection.current_database
end

#install_module(module_name) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/textacular/postgres_module_installer.rb', line 3

def install_module(module_name)
  major, minor, patch = postgres_version.split('.')

  if major.to_i >= 9 && minor.to_i >= 1
    install_postgres_91_module(module_name)
  else
    install_postgres_90_module(module_name)
  end
end