Search code examples
ruby-on-rails-4sublimetext2

replace word/variable name in all files of an app


In my rails app I have a scaffold clients that is already linked to many other files in the app.

Is there a way to replace the word 'client' with 'guest' everywhere in the app, without doing it manually?


Solution

  • Indeed, a simple find-and-replace did the trick.

    But you have to be careful with it and do it in a few steps:

    1. replace client with guest

    2. replace Client with guest (case sensitive)

    Careful if the plural form is different (like identity-identities)