Rename `ReactionController` to `ReactionsController`
This commit is contained in:
parent
d36fbf85f4
commit
ca043d56ef
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class ReactionController < ApplicationController
|
class ReactionsController < ApplicationController
|
||||||
def index
|
def index
|
||||||
answer = Answer.includes([smiles: { user: :profile }]).find(params[:id])
|
answer = Answer.includes([smiles: { user: :profile }]).find(params[:id])
|
||||||
|
|
|
@ -155,7 +155,7 @@ Rails.application.routes.draw do
|
||||||
post "/@:username/a/:id/pin", to: "answer#pin", as: :pin_answer
|
post "/@:username/a/:id/pin", to: "answer#pin", as: :pin_answer
|
||||||
delete "/@:username/a/:id/pin", to: "answer#unpin", as: :unpin_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/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/q/:id", to: "question#show", as: :question
|
||||||
get "/@:username/c/:id/reactions", to: "comment#show_reactions", as: :comment_reactions
|
get "/@:username/c/:id/reactions", to: "comment#show_reactions", as: :comment_reactions
|
||||||
get "/@:username/followers", to: "user#followers", as: :show_user_followers
|
get "/@:username/followers", to: "user#followers", as: :show_user_followers
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
require "rails_helper"
|
require "rails_helper"
|
||||||
|
|
||||||
describe ReactionController, type: :controller do
|
describe ReactionsController, type: :controller do
|
||||||
describe "#index" do
|
describe "#index" do
|
||||||
shared_examples_for "succeeds" do
|
shared_examples_for "succeeds" do
|
||||||
it "returns the correct response" do
|
it "returns the correct response" do
|
Loading…
Reference in New Issue