Update a bit for Rails 4