Updated to work with Rails 4

You're welcome...