Should work for Rails 4 as well