Remove and fix methods for deprecation warning in rails 4 2

`ActiveRecord::Base.logger.quietly` will be deprecated in future release of Rails, and it is not thread safe, so this method is removed on this occasion.

Also one more deprecated syntax is fixed.