Compatible with Rails 4.