Skip to content

Commit

Permalink
following, followers のステータス指定部分を削除
Browse files Browse the repository at this point in the history
  • Loading branch information
rakuda-san-desu committed Oct 20, 2023
1 parent 89291f5 commit ed89cd7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions 7_0/ch14/app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions 7_0/ch14/test/integration/following_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand All @@ -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|
Expand Down

0 comments on commit ed89cd7

Please sign in to comment.