Fixed deprecation warning to make the whole thing ready for Rails 4.2.