Fix issue #1: Doesn't work with Rails 4