Skip to content

Instantly share code, notes, and snippets.

@zemagno
Last active January 28, 2016 18:38
Show Gist options
  • Save zemagno/26c01fe094be96b3f4f7 to your computer and use it in GitHub Desktop.
Save zemagno/26c01fe094be96b3f4f7 to your computer and use it in GitHub Desktop.
class RmDb < ActiveRecord::Base
establish_connection "rm"
self.abstract_class = true
end
class FuncionarioRm < RmDb
# set_table_name "VW_DadoPessoalInfra"
set_table_name "VW_InfraDadosProfissionais"
end
database.yml
rm:
adapter: sqlserver
mode: dblib
host: 10.200.1.14 # Name from freetds.conf, host or instance 'localhost\SQLEXPRESS'
port: 65392 # Used if host present. Default is 1433.
database: portal
username: userif
password: password
timeout: 5000
encoding: ISO88591
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment