From 9505eabcb3c59c606131b6f38a9ff1d9e7b95581 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sun, 27 Aug 2017 18:12:31 +0200 Subject: [PATCH] Fix ApplicationHelper#changelog_url with frozen strings --- app/helpers/application_helper.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 53be44ead..f262b288a 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -17,8 +17,9 @@ module ApplicationHelper return AppConfig.settings.changelog_url.get if AppConfig.settings.changelog_url.present? url = "https://github.com/diaspora/diaspora/blob/master/Changelog.md" - url.sub!('/master/', "/#{AppConfig.git_revision}/") if AppConfig.git_revision.present? - url + return url if AppConfig.git_revision.blank? + + url.sub("/master/", "/#{AppConfig.git_revision}/") end def source_url