• Sean McGivern's avatar
    Don't reload ActiveRecord objects when building note URLs · 222a6b46
    Sean McGivern authored
    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.
    222a6b46
fix-n-plus-one-in-url-builder.yml 106 Bytes