
Untitled
By: a guest on
May 6th, 2012 | syntax:
None | size: 0.84 KB | hits: 11 | expires: Never
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