From 2177daeae92b77be6797ba8f2ab6ebe1e641e078 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sat, 18 Feb 2023 17:09:40 -0500 Subject: Autofix Rubocop Style/RedundantBegin (#23703) --- app/controllers/api/v1/trends/tags_controller.rb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'app/controllers/api/v1/trends/tags_controller.rb') diff --git a/app/controllers/api/v1/trends/tags_controller.rb b/app/controllers/api/v1/trends/tags_controller.rb index 21adfa2a1..75c3ed218 100644 --- a/app/controllers/api/v1/trends/tags_controller.rb +++ b/app/controllers/api/v1/trends/tags_controller.rb @@ -18,13 +18,11 @@ class Api::V1::Trends::TagsController < Api::BaseController end def set_tags - @tags = begin - if enabled? - tags_from_trends.offset(offset_param).limit(limit_param(DEFAULT_TAGS_LIMIT)) - else - [] - end - end + @tags = if enabled? + tags_from_trends.offset(offset_param).limit(limit_param(DEFAULT_TAGS_LIMIT)) + else + [] + end end def tags_from_trends -- cgit