Fix ActiveRecord connect/disconect
Merge pull request #257 from fred/hotfix/256-active-record-fix

Fix ActiveRecord connect/disconect