• Andreas Brandl's avatar
    Explicit use of avatar_icon_* calls depending on situation. · c641dff0
    Andreas Brandl authored
    We want to drop the generic #avatar_icon helper that supports both an email
    and a user object being passed in. Instead, we want to explicitly use the #avatar_icon_for_user
    and #avatar_icon_for_email helpers depending on what we have at hand.
    This allows us to avoid unnecessary database queries (e.g. call
    User.find_by_any_email if we already have the user).
    
    In situations like here, this makes it less convenient to use.
    c641dff0
avatars_helper_spec.rb 4.46 KB