Update to be Rails 4 compatible