diff --git a/app/controllers/api/v0/comments_controller.rb b/app/controllers/api/v0/comments_controller.rb index 024651a30..8f3dd8398 100644 --- a/app/controllers/api/v0/comments_controller.rb +++ b/app/controllers/api/v0/comments_controller.rb @@ -1,7 +1,6 @@ module Api module V0 class CommentsController < ApiController - # before_action :set_cache_control_headers, only: [:index, :show] caches_action :index, cache_path: proc { |c| c.params.permit! }, expires_in: 10.minutes diff --git a/app/controllers/api/v0/tags_controller.rb b/app/controllers/api/v0/tags_controller.rb index 42c8a69bf..52502788c 100644 --- a/app/controllers/api/v0/tags_controller.rb +++ b/app/controllers/api/v0/tags_controller.rb @@ -1,7 +1,6 @@ module Api module V0 class TagsController < ApplicationController - # before_action :set_cache_control_headers, only: [:index] caches_action :index, cache_path: proc { |c| c.params.permit! }, expires_in: 10.minutes diff --git a/app/controllers/chat_channels_controller.rb b/app/controllers/chat_channels_controller.rb index 830f877c4..3a0b6fc3c 100644 --- a/app/controllers/chat_channels_controller.rb +++ b/app/controllers/chat_channels_controller.rb @@ -145,7 +145,6 @@ class ChatChannelsController < ApplicationController @active_channel = ChatChannel.find_by(slug: slug) @active_channel.current_user = current_user if @active_channel end - # @github_token = generate_github_token Not yet fully baked, not needed. generate_algolia_search_key end diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 4982a53c9..afa7fe578 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -35,11 +35,8 @@ class CommentsController < ApplicationController # GET /comments/1 # GET /comments/1.json - # def show - # @comment = Comment.find_by_id_code(params[:id_code]) - # end - # GET /comments/1/edit + def edit @comment = Comment.find(params[:id_code].to_i(26)) authorize @comment diff --git a/app/controllers/internal/articles_controller.rb b/app/controllers/internal/articles_controller.rb index 4643ce552..a83a0cab9 100644 --- a/app/controllers/internal/articles_controller.rb +++ b/app/controllers/internal/articles_controller.rb @@ -75,9 +75,7 @@ class Internal::ArticlesController < Internal::ApplicationController article.update!(article_params) Article.where.not(id: article.id).where(live_now: true).update_all(live_now: false) if article.live_now CacheBuster.new.bust "/live_articles" - # raise render body: nil - # redirect_to "/internal/articles" end private diff --git a/app/controllers/internal/reactions_controller.rb b/app/controllers/internal/reactions_controller.rb index b6a99ad8c..b9e9a26fa 100644 --- a/app/controllers/internal/reactions_controller.rb +++ b/app/controllers/internal/reactions_controller.rb @@ -1,6 +1,5 @@ class Internal::ReactionsController < Internal::ApplicationController def update - # raise @reaction = Reaction.find(params[:id]) @reaction.update(status: params[:reaction][:status]) redirect_to "/internal/reports" diff --git a/spec/models/article_spec.rb b/spec/models/article_spec.rb index e3e8dc632..e3cc7bac6 100644 --- a/spec/models/article_spec.rb +++ b/spec/models/article_spec.rb @@ -389,9 +389,6 @@ RSpec.describe Article, type: :model do end describe "before save" do - # before do - # article = create(:article, user_id: user.id) - # end it "assigns path on save" do article = create(:article, user_id: user.id) expect(article.path).to eq("/#{article.username}/#{article.slug}") diff --git a/spec/requests/pusher_auth_spec.rb b/spec/requests/pusher_auth_spec.rb index 15c0321e0..7a59f42ae 100644 --- a/spec/requests/pusher_auth_spec.rb +++ b/spec/requests/pusher_auth_spec.rb @@ -11,13 +11,5 @@ RSpec.describe "PusherAuth", type: :request do } expect(response.body).to include("Forbidden") end - - # it "returns forbidden with invalid channel" do - # sign_in user - # post "/pusher/auth", params: { - # channel_name: "private-message-notifications-#{user.id}" - # } - # expect(response.body).to include("Forbidden") - # end end end