diff --git a/app/controllers/reaction_controller.rb b/app/controllers/reactions_controller.rb similarity index 77% rename from app/controllers/reaction_controller.rb rename to app/controllers/reactions_controller.rb index c6df6000..fbf01fce 100644 --- a/app/controllers/reaction_controller.rb +++ b/app/controllers/reactions_controller.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class ReactionController < ApplicationController +class ReactionsController < ApplicationController def index answer = Answer.includes([smiles: { user: :profile }]).find(params[:id]) diff --git a/app/views/reaction/index.html.haml b/app/views/reactions/index.html.haml similarity index 100% rename from app/views/reaction/index.html.haml rename to app/views/reactions/index.html.haml diff --git a/config/routes.rb b/config/routes.rb index 7e5e259c..3161f9f8 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -155,7 +155,7 @@ Rails.application.routes.draw do post "/@:username/a/:id/pin", to: "answer#pin", as: :pin_answer delete "/@:username/a/:id/pin", to: "answer#unpin", as: :unpin_answer get "/@:username/a/:id/comments", to: "comment#index", as: :comments - get "/@:username/a/:id/reactions", to: "reaction#index", as: :reactions + get "/@:username/a/:id/reactions", to: "reactions#index", as: :reactions get "/@:username/q/:id", to: "question#show", as: :question get "/@:username/c/:id/reactions", to: "comment#show_reactions", as: :comment_reactions get "/@:username/followers", to: "user#followers", as: :show_user_followers diff --git a/spec/controllers/reaction_controller_spec.rb b/spec/controllers/reactions_controller_spec.rb similarity index 94% rename from spec/controllers/reaction_controller_spec.rb rename to spec/controllers/reactions_controller_spec.rb index 1b76617f..605a515c 100644 --- a/spec/controllers/reaction_controller_spec.rb +++ b/spec/controllers/reactions_controller_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -describe ReactionController, type: :controller do +describe ReactionsController, type: :controller do describe "#index" do shared_examples_for "succeeds" do it "returns the correct response" do