Fixes deprecation warning added in Rails 3.1