Added what seems to be all that is needed to get this working for Rails ...

...and ActiveRecord 4.0.0.