geekq/workflow — pull request #111 by damncabbage (2014-07-29 03:14:17+00:00)
Title: Adds ability to select different adapters via a `workflow_adapter` class method.

This PR:
* Makes the ActiveRecord adapter more self-contained (by having it handle its own inclusion, extension and before_validation hook setup).
* Has Workflow look for a `workflow_adapter` class method first before going on to include ActiveRecord or Remodel adapters.

From the included documentation change:

> Other adapters (such as a custom ActiveRecord plugin) can be selected by adding a `workflow_adapter` class method, eg.
>
> ```ruby
class Example
def self.workflow_adapter
MyCustomAdapter
end
include Workflow
# ...
end
```
>
> (The above will include `MyCustomAdapter` *instead* of `Workflow::Adapter::ActiveRecord`.)