-
- Downloads
Explicit use of avatar_icon_* calls depending on situation.
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.
Showing
- app/helpers/avatars_helper.rb 9 additions, 1 deletionapp/helpers/avatars_helper.rb
- app/views/notify/pipeline_failed_email.html.haml 8 additions, 2 deletionsapp/views/notify/pipeline_failed_email.html.haml
- app/views/notify/pipeline_success_email.html.haml 8 additions, 2 deletionsapp/views/notify/pipeline_success_email.html.haml
- spec/helpers/avatars_helper_spec.rb 8 additions, 8 deletionsspec/helpers/avatars_helper_spec.rb
Please register or sign in to comment