Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Pge
- module Base
- module RepositorioDigital
- class BaseConexao < ::ActiveRecord::Base
- if RUBY_PLATFORM =~ /java/
- require 'rubygems'
- gem 'activerecord-jdbcpostgresql-adapter'
- require 'jdbc_adapter'
- end
- self.abstract_class = true
- self.configurations[RAILS_ENV]['adapter'] = "postgresql"
- self.configurations[RAILS_ENV]['host'] = "host"
- self.configurations[RAILS_ENV]['username'] = "user"
- self.configurations[RAILS_ENV]['password'] = "password"
- self.configurations[RAILS_ENV]['database'] = "db_name"
- if RAILS_ENV = 'test' then self.configurations[RAILS_ENV]['database'] = 'db_name_test' end
- self.configurations[RAILS_ENV]['schema_search_path'] = "public"
- establish_connection
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment