Don't reload ActiveRecord objects when building note URLs
When we build a note URL, and we have the note loaded already, there are two cases: 1. The `noteable` is already loaded. In that case, this is faster as it doesn't build a new AR object from the query. 2. The `noteable` is not already loaded. In that case, this change is no worse than the previous code.
Showing
Please register or sign in to comment