Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Change the adapter. But this is not right.
- # Path to the database.yml
- #
- active_record_config = File.expand_path('../../', __FILE__)
- config = YAML.load_file(File.join(active_record_config, 'config/database.yml'))[ENV['GOLIATH_ENV']]
- # Changing the adapter from 'em_mysql2' to 'mysql2'. But this is not right.
- #
- ActiveRecord::Base.establish_connection(:adapter => 'mysql2',
- :database => config['database'],
- :username => config['username'],
- :password => config['password'],
- :host => config['host'],
- :pool => config['pool'])
Add Comment
Please, Sign In to add comment