Skip to content

Instantly share code, notes, and snippets.

@flanker
Created July 25, 2017 10:30
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 flanker/705fdbc11a94abf7c62c027e3946a933 to your computer and use it in GitHub Desktop.
Save flanker/705fdbc11a94abf7c62c027e3946a933 to your computer and use it in GitHub Desktop.
search and replace to add `params` in controller tests when upgrading rails to 5.1
# TEXT TO FIND: ^(\s+)(get|post|put|patch|destroy) :(index|show|edit|update|new|create|destroy), ([^params].+[^,])$
# REPLACE WITH: $1$2 :$3, params: {$4}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment