applicake/doorkeeper — pull request #120 by petergoldstein (2012-07-28 17:08:51+00:00)
Title: Replacing update_attribute with update_column to eliminate deprecation warnings

The method 'update_attribute' has been deprecated on ActiveRecord 3.2.7 and is set to be eliminated in Rails 4. This caused lots of deprecation warnings to display when running the Doorkeeper test suite.

These changes eliminate the use of update_attribute in the code base, replacing it with update_column and eliminating the warnings.

One subtlety occurs with Doorkeeper's Mongoid support. Mongoid does have an 'update_attribute' method on Mongoid::Document, with no corresponding 'update_column'. To ensure that the Mongoid tests run green I aliased 'update_column' on a new Doorkeeper::Models::Mongoid::Revocable module. This could potentially be refactored into something that's less weighted towards AR.

Both AR and Mongoid tests run green with no extraneous warnings.