swanandp/acts_as_list — pull request #129 by wioux (2014-08-25 22:56:14+00:00)
Title: Cast column default value to int before comparing with position column

This fixes an issue resulting from Model.columns_hash['position'].default being returned as a String object. Since `send(position_column)` returns the default value after casting, the comparison in `default_position?` fails.

Seen while running Rails 4.2.0beta1 with a Postgres database.

```
irb(main):003:0> pp LineItem.columns_hash['position'].default
"0"
```