Updated active_record adapter to use modern query methods, eliminating hordes of deprecation warnings in Rails 4.