Rails 4.1 compatibility
Pass symbols to .establish_connection

Passing a String for a configuration lookup is deprecated in Rails 4.1
Fix deprecations and remove Rails 2 code
HasAndBelongsToMany is gone from Rails 4.1
tmp