gocardless/statesman — pull request #33 by mrappleton (2014-03-24 17:53:19+00:00)
Title: Scopes

Address #20 by adding a new mixin for the parent model which defines `.with_state` and `.without_state` scope methods for the active record adapter. This implementation also requires that the parent model defines a `transition_class` method:

```ruby
class MyModel < ActiveRecord::Base
include Statesman::Adapters::ActiveRecordModel

#...

private

def transition_model
MyTransition
end
end
```
@alan could you give this a code review please?