Made Rails 4 compatible