pluginaweek/state_machine — Issue #150: Initial state doesn't work with rails 3.2
Author: morgoth
Created: 2012-01-02 12:03:41+00:00
State: open

Hi.

Setting default state doesn't work in rails 3.2 (branch 3-2-stable).

Sample app reproducing issue:

https://github.com/morgoth/state-machine-rails-3-2

```ruby
class Post < ActiveRecord::Base
state_machine :initial => :approved do
event :approve do
transition all => :approved
end
end
end
```

```ruby
Post.new.state
=> nil
```

I tried rails revision: `6e9cd3846811718611543dae049c000076319587` (it's working fine when using gem 3.2.rc1)