From f76c4e236b5a7f4350a0a464c9f95f9fdca84f8b Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Wed, 18 Oct 2023 21:07:17 +0200 Subject: [PATCH] Fix rubocop nits --- app/helpers/social_helper/twitter_methods.rb | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/helpers/social_helper/twitter_methods.rb b/app/helpers/social_helper/twitter_methods.rb index 716060f8..318dd1f9 100644 --- a/app/helpers/social_helper/twitter_methods.rb +++ b/app/helpers/social_helper/twitter_methods.rb @@ -8,12 +8,15 @@ module SocialHelper::TwitterMethods original_question_length = question_content.length answer_content = twitter_markdown answer.content original_answer_length = answer_content.length - answer_url = answer_url( - id: answer.id, - username: answer.user.screen_name, - host: APP_CONFIG['hostname'], - protocol: (APP_CONFIG['https'] ? :https : :http) - ) unless omit_url + + unless omit_url + answer_url = answer_url( + id: answer.id, + username: answer.user.screen_name, + host: APP_CONFIG["hostname"], + protocol: (APP_CONFIG["https"] ? :https : :http), + ) + end parsed_tweet = { :valid => false } tweet_text = ""