remove unused controller actions
This commit is contained in:
@@ -1,17 +1,4 @@
|
||||
class UserFollowsController < ApplicationController
|
||||
before_action :set_user_follow, only: %i[ show update destroy ]
|
||||
|
||||
# GET /user_follows
|
||||
# GET /user_follows.json
|
||||
def index
|
||||
@user_follows = UserFollow.all
|
||||
end
|
||||
|
||||
# GET /user_follows/1
|
||||
# GET /user_follows/1.json
|
||||
def show
|
||||
end
|
||||
|
||||
# POST /user_follows
|
||||
# POST /user_follows.json
|
||||
def create
|
||||
@@ -24,30 +11,16 @@ class UserFollowsController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
# PATCH/PUT /user_follows/1
|
||||
# PATCH/PUT /user_follows/1.json
|
||||
def update
|
||||
if @user_follow.update(user_follow_params)
|
||||
render :show, status: :ok, location: @user_follow
|
||||
else
|
||||
render json: @user_follow.errors, status: :unprocessable_entity
|
||||
end
|
||||
end
|
||||
|
||||
# DELETE /user_follows/1
|
||||
# DELETE /user_follows/1.json
|
||||
def destroy
|
||||
@user_follow.destroy
|
||||
UserFollow.find(params[:id]).destroy
|
||||
end
|
||||
|
||||
private
|
||||
# Use callbacks to share common setup or constraints between actions.
|
||||
def set_user_follow
|
||||
@user_follow = UserFollow.find(params[:id])
|
||||
end
|
||||
|
||||
# Only allow a list of trusted parameters through.
|
||||
def user_follow_params
|
||||
params.require(:user_follow).permit(:follower_id, :followed_id)
|
||||
end
|
||||
# Only allow a list of trusted parameters through.
|
||||
def user_follow_params
|
||||
params.require(:user_follow).permit(:follower_id, :followed_id)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user