From f6e26f1751af92a69382377f4f74690cde4076f4 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sun, 15 Oct 2023 10:21:46 +0200 Subject: [PATCH] Remove superfluous rubocop:disable comments --- Rakefile | 2 +- app/controllers/ajax/web_push_controller.rb | 2 +- app/controllers/inbox_controller.rb | 2 +- app/models/user.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Rakefile b/Rakefile index 17ba7dcf..dfd42972 100644 --- a/Rakefile +++ b/Rakefile @@ -7,7 +7,7 @@ require File.expand_path("config/application", __dir__) Rails.application.load_tasks -namespace :justask do # rubocop:disable Metrics/BlockLength +namespace :justask do desc "Gives admin status to a user." task :admin, [:screen_name] => :environment do |_t, args| abort "screen name required" if args[:screen_name].nil? diff --git a/app/controllers/ajax/web_push_controller.rb b/app/controllers/ajax/web_push_controller.rb index 4dd9ecdd..04d7fb40 100644 --- a/app/controllers/ajax/web_push_controller.rb +++ b/app/controllers/ajax/web_push_controller.rb @@ -41,7 +41,7 @@ class Ajax::WebPushController < AjaxController @response[:message] = t(".subscription_count", count: current_user.web_push_subscriptions.count) end - def unsubscribe # rubocop:disable Metrics/AbcSize + def unsubscribe removed = if params.key?(:endpoint) current_user.web_push_subscriptions.where("subscription ->> 'endpoint' = ?", params[:endpoint]).destroy_all else diff --git a/app/controllers/inbox_controller.rb b/app/controllers/inbox_controller.rb index 7f3db342..56b01f5a 100644 --- a/app/controllers/inbox_controller.rb +++ b/app/controllers/inbox_controller.rb @@ -3,7 +3,7 @@ class InboxController < ApplicationController before_action :authenticate_user! - def show # rubocop:disable Metrics/MethodLength + def show find_author find_inbox_entries diff --git a/app/models/user.rb b/app/models/user.rb index 2b2241e0..762f7020 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class User < ApplicationRecord # rubocop:disable Metrics/ClassLength +class User < ApplicationRecord include User::Relationship include User::Relationship::Follow include User::Relationship::Block