Skip to content

Commit

Permalink
Merge pull request #84 from yasslab/remove_status_from_following_foll…
Browse files Browse the repository at this point in the history
…owers_actions

following, followers のステータス指定部分を削除
  • Loading branch information
rakuda-san-desu authored Oct 20, 2023
2 parents 89291f5 + ed89cd7 commit 85a5f1e
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 85a5f1e

Please sign in to comment.