applicake/doorkeeper — pull request #140 by petergoldstein (2012-08-16 17:14:44+00:00)
Title: Adding :active_record as the default value for the ORM

Currently when the ORM isn't specified as an option in the Doorkeeper configuration block and ActiveRecord is being used, Doorkeeper loads but then throws a somewhat obscure error about 'belongs_to' not being defined. This is confusing and makes the actual issue difficult to track down.

As the common default case for Doorkeeper is using ActiveRecord, it makes sense to default to ActiveRecord when an ORM is unspecified. This has the benefits of eliminating this confusing error, making it easier to upgrade Doorkeeper, and simplifying configuration for the common case.

Making this change did involve some changes to the tests, as the ORM needs to be explicitly specified in the Doorkeeper.configure blocks in the tests to ensure that the now default ActiveRecord is not loaded when testing Mongoid or MongoMapper.