Skip to content

Instantly share code, notes, and snippets.

@kucaahbe
Created June 8, 2015 11:40
Show Gist options
  • Save kucaahbe/1416185d44ca73db6f4b to your computer and use it in GitHub Desktop.
Save kucaahbe/1416185d44ca73db6f4b to your computer and use it in GitHub Desktop.
Rails old-style configs to new style rename
sed -i.bak -E "s/YAML\.load_file\(Rails\.root\.join\('config\/(.+)\.yml'\)\)\[Rails\.env\]/Rails.application.config_for('\1')/" $(git grep -l YAML.load_file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment