Redmine Refactor #124: Rename Method UsersController#add

To finish up yesterday’s refactoring of UsersController#add I used rename method to rename #add to #new.

Before

1
2
3
4
class UsersController  Setting.default_language)
    @auth_sources = AuthSource.find(:all)
  end
end

After

1
2
3
4
class UsersController  Setting.default_language)
    @auth_sources = AuthSource.find(:all)
  end
end

Rename method is such a simple refactoring that I usually perform it along with other refactorings like extract method. This time I decided to do it separately to show how easy refactoring can be.

Reference commit