From ed89cd7a13ca45adc10f270b971316daff57324b Mon Sep 17 00:00:00 2001 From: rakuda Date: Fri, 20 Oct 2023 16:57:03 +0900 Subject: [PATCH] =?UTF-8?q?following,=20followers=20=E3=81=AE=E3=82=B9?= =?UTF-8?q?=E3=83=86=E3=83=BC=E3=82=BF=E3=82=B9=E6=8C=87=E5=AE=9A=E9=83=A8?= =?UTF-8?q?=E5=88=86=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 7_0/ch14/app/controllers/users_controller.rb | 4 ++-- 7_0/ch14/test/integration/following_test.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/7_0/ch14/app/controllers/users_controller.rb b/7_0/ch14/app/controllers/users_controller.rb index eda21a6..7b9c40d 100644 --- a/7_0/ch14/app/controllers/users_controller.rb +++ b/7_0/ch14/app/controllers/users_controller.rb @@ -50,14 +50,14 @@ def following @title = "Following" @user = User.find(params[:id]) @users = @user.following.paginate(page: params[:page]) - render 'show_follow', status: :unprocessable_entity + render 'show_follow' end def followers @title = "Followers" @user = User.find(params[:id]) @users = @user.followers.paginate(page: params[:page]) - render 'show_follow', status: :unprocessable_entity + render 'show_follow' end private diff --git a/7_0/ch14/test/integration/following_test.rb b/7_0/ch14/test/integration/following_test.rb index 17735ae..a753608 100644 --- a/7_0/ch14/test/integration/following_test.rb +++ b/7_0/ch14/test/integration/following_test.rb @@ -13,7 +13,7 @@ class FollowPagesTest < Following test "following page" do get following_user_path(@user) - assert_response :unprocessable_entity + assert_response :success assert_not @user.following.empty? assert_match @user.following.count.to_s, response.body @user.following.each do |user| @@ -23,7 +23,7 @@ class FollowPagesTest < Following test "followers page" do get followers_user_path(@user) - assert_response :unprocessable_entity + assert_response :success assert_not @user.followers.empty? assert_match @user.followers.count.to_s, response.body @user.followers.each do |user|