From 57adc74d6b91bd963b4fc7a661d549e09b67d00e Mon Sep 17 00:00:00 2001 From: Fawaz Farid Date: Tue, 30 Apr 2024 21:59:38 +0300 Subject: [PATCH] Change default size for site_icon_path --- app/helpers/application_helper.rb | 2 +- spec/helpers/application_helper_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 1b1e682005b..c630cfe6dd8 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -232,7 +232,7 @@ module ApplicationHelper EmojiFormatter.new(html, custom_emojis, other_options.merge(animate: prefers_autoplay?)).to_s end - def site_icon_path(type, size = :'32') + def site_icon_path(type, size = '48') icon = SiteUpload.find_by(var: type) return nil unless icon diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index de321b0737f..56501034b2d 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -291,7 +291,7 @@ describe ApplicationHelper do let!(:favicon) { Fabricate(:site_upload, var: 'favicon') } it 'returns the URL of the icon' do - expect(helper.site_icon_path('favicon')).to eq(favicon.file.url('32')) + expect(helper.site_icon_path('favicon')).to eq(favicon.file.url('48')) end it 'returns the URL of the icon with size parameter' do