Update for Rails4