[WIP] Rails 4 compatibility

Let's test this thing with Rails 4.