for Rails 4