diff --git a/app/controllers/feedback_messages_controller.rb b/app/controllers/feedback_messages_controller.rb index 7af125c16..66773ae24 100644 --- a/app/controllers/feedback_messages_controller.rb +++ b/app/controllers/feedback_messages_controller.rb @@ -37,7 +37,7 @@ class FeedbackMessagesController < ApplicationController <<~HEREDOC #{generate_user_detail} Category: #{feedback_message_params[:category]} - Internal Report: https://dev.to/internal/reports + Internal Report: https://#{ApplicationConfig['APP_DOMAIN']}/internal/reports *_ Reported URL: #{feedback_message_params[:reported_url]} _* ----- *Message:* #{feedback_message_params[:message]} @@ -49,7 +49,7 @@ class FeedbackMessagesController < ApplicationController <<~HEREDOC *Logged in user:* - reporter: #{current_user.username} - https://dev.to/#{current_user.username} + reporter: #{current_user.username} - https://#{ApplicationConfig['APP_DOMAIN']}/#{current_user.username} email: HEREDOC end diff --git a/app/controllers/internal/tools_controller.rb b/app/controllers/internal/tools_controller.rb index 98d11c65f..0d0759a2f 100644 --- a/app/controllers/internal/tools_controller.rb +++ b/app/controllers/internal/tools_controller.rb @@ -39,7 +39,7 @@ class Internal::ToolsController < Internal::ApplicationController end def bust_link(link) - link.sub!("https://dev.to", "") if link.starts_with?("https://dev.to") + link.sub!("https://#{ApplicationConfig['APP_DOMAIN']}", "") if link.starts_with?("https://#{ApplicationConfig['APP_DOMAIN']}") CacheBuster.bust(link) CacheBuster.bust("#{link}/") CacheBuster.bust("#{link}?i=i") diff --git a/app/controllers/internal/welcome_controller.rb b/app/controllers/internal/welcome_controller.rb index 3c5ba28a7..166d826e4 100644 --- a/app/controllers/internal/welcome_controller.rb +++ b/app/controllers/internal/welcome_controller.rb @@ -24,7 +24,7 @@ class Internal::WelcomeController < Internal::ApplicationController tags: welcome --- - Hey there! Welcome to dev.to! + Hey there! Welcome to #{ApplicationConfig['COMMUNITY_NAME']}! ![WELCOME TO THE INTERNET](https://slack-imgs.com/?c=1&url=http%3A%2F%2Fmedia0.giphy.com%2Fmedia%2FzhbrTTpmSCYog%2Fgiphy-downsized.gif) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 84f08b3b9..41c042e86 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -266,10 +266,10 @@ class UsersController < ApplicationController def handle_account_tab @email_body = <<~HEREDOC - Hello DEV Team, + Hello #{ApplicationConfig['COMMUNITY_NAME']} Team, %0A %0A - I would like to delete my dev.to account. + I would like to delete my account. %0A%0A You can keep any comments and discussion posts under the Ghost account. %0A diff --git a/app/labor/badge_rewarder.rb b/app/labor/badge_rewarder.rb index 34521a20f..5475a161c 100644 --- a/app/labor/badge_rewarder.rb +++ b/app/labor/badge_rewarder.rb @@ -20,7 +20,7 @@ module BadgeRewarder # ID 3 is the proper ID in prod. We should change in future to ENV var. badge_id = Badge.find_by(slug: "beloved-comment")&.id || 3 Comment.where("positive_reactions_count > ?", 24).find_each do |comment| - message = "You're DEV famous! [This is the comment](https://dev.to#{comment.path}) for which you are being recognized. 😄" + message = "You're famous! [This is the comment](https://#{ApplicationConfig['APP_DOMAIN']}#{comment.path}) for which you are being recognized. 😄" achievement = BadgeAchievement.create( user_id: comment.user_id, badge_id: badge_id, diff --git a/app/labor/cache_buster.rb b/app/labor/cache_buster.rb index b85a1f0c2..943dc49ca 100644 --- a/app/labor/cache_buster.rb +++ b/app/labor/cache_buster.rb @@ -9,9 +9,9 @@ module CacheBuster def self.bust(path) return unless Rails.env.production? - HTTParty.post("https://api.fastly.com/purge/https://dev.to#{path}", + HTTParty.post("https://api.fastly.com/purge/https://#{ApplicationConfig['APP_DOMAIN']}#{path}", headers: { "Fastly-Key" => ApplicationConfig["FASTLY_API_KEY"] }) - HTTParty.post("https://api.fastly.com/purge/https://dev.to#{path}?i=i", + HTTParty.post("https://api.fastly.com/purge/https://#{ApplicationConfig['APP_DOMAIN']}#{path}?i=i", headers: { "Fastly-Key" => ApplicationConfig["FASTLY_API_KEY"] }) rescue URI::InvalidURIError => e Rails.logger.error("Trying to bust cache of an invalid uri: #{e}")