PERF: Avoid additional database query when viewing own user. (PR #14239)

GitHub

Not related to your change, but is the chomp('.json') really needed here? Looks weird.

Also, it probably should use User.normalize_username(params[:username]) to prevent problems with Unicode.

Iā€™ll defer to another PR for this :slight_smile:

1 Like