Class: MageRecord::Connection
- Inherits:
-
Object
- Object
- MageRecord::Connection
- Defined in:
- lib/magerecord/connection.rb
Instance Method Summary collapse
-
#initialize(hostname, db, user, pwd) ⇒ Connection
constructor
A new instance of Connection.
Constructor Details
#initialize(hostname, db, user, pwd) ⇒ Connection
Returns a new instance of Connection.
3 4 5 6 7 8 9 10 11 |
# File 'lib/magerecord/connection.rb', line 3 def initialize(hostname, db, user, pwd) ActiveRecord::Base.establish_connection( adapter: 'mysql2', host: hostname, database: db, username: user, password: pwd ) end |