Skip to content

Instantly share code, notes, and snippets.

@gabu
Created July 20, 2016 02:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabu/d31ab53ebd8022e7df6d16440aee43aa to your computer and use it in GitHub Desktop.
Save gabu/d31ab53ebd8022e7df6d16440aee43aa to your computer and use it in GitHub Desktop.
Rename classes for Rails 5
# app/models
git grep -l ActiveRecord::Base -- app/models | xargs sed -i '' "s/ActiveRecord::Base/ApplicationRecord/g"
# test/controllers
git grep -l ActionController::TestCase -- test/controllers | xargs sed -i '' "s/ActionController::TestCase/ActionDispatch::IntegrationTest/g"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment