update for Rails 4