Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Rails::Initializer.run do |config|
- config.action_controller.session = {
- :session_key => '_sector_hunter_session',
- :secret => 'f24a7eabb040c028a67a982efec0918efc67e2c304209ba1d7d17b074bb3154b946a4b09bf90f3a5950b8a7a3bfa6b84c75ad98d70366ccd48ad62debb2
- 319e6'
- }
- class << config
- def database_configuration
- require 'json'
- ci_db_config = JSON.parse `php #{RAILS_ROOT}/../config_to_json.php database`
- active_group = ci_db_config['db'][ci_db_config['active_group']]
- super.merge!({ 'RAILS_ENV' => {
- :adapter => active_group['dbdriver'],
- :database => active_group['database'],
- :username => active_group['username'],
- :password => active_group['password'],
- :host => active_group['hostname'],
- :pool => 5
- }})
- end
- end
- puts config.database_configuration.inspect
- end
Add Comment
Please, Sign In to add comment