Added ActiveRecord 4.1 support
ActiveRecord 4.1 fixes