Be compatible with Rails 4