Fixes deprecation warning under Rails 4

[Closes #784]