From c18ac74700b4bd8a53d46e5cd6931c25e8a3d4a3 Mon Sep 17 00:00:00 2001 From: nilsding Date: Mon, 8 Dec 2014 19:51:34 +0100 Subject: [PATCH] renamed following to friends --- app/controllers/user_controller.rb | 2 +- app/views/static/index.html.haml | 2 +- app/views/user/_profile_info.html.haml | 2 +- config/routes.rb | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 8ef8612a..0d8f6784 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -29,7 +29,7 @@ class UserController < ApplicationController render 'show_follow' end - def following + def friends @title = 'Following' @user = User.find_by_screen_name!(params[:username]) @users = @user.friends.reverse_order.paginate(page: params[:page]) diff --git a/app/views/static/index.html.haml b/app/views/static/index.html.haml index 62dd8e1c..42de943f 100644 --- a/app/views/static/index.html.haml +++ b/app/views/static/index.html.haml @@ -17,7 +17,7 @@ .col-md-6.col-sm-6.col-xs-6 %h4.entry-text#follower-count= current_user.follower_count %h6.entry-subtext Follower - %a{href: show_user_following_path(current_user.screen_name)} + %a{href: show_user_friends_path(current_user.screen_name)} .col-md-6.col-sm-6.col-xs-6 %h4.entry-text#friend-count= current_user.friend_count %h6.entry-subtext Following diff --git a/app/views/user/_profile_info.html.haml b/app/views/user/_profile_info.html.haml index 76d56d0e..d1984d01 100644 --- a/app/views/user/_profile_info.html.haml +++ b/app/views/user/_profile_info.html.haml @@ -28,7 +28,7 @@ .col-md-6.col-sm-6.col-xs-6 %h4.entry-text#follower-count= @user.follower_count %h6.entry-subtext Follower - %a{href: show_user_following_path(@user.screen_name)} + %a{href: show_user_friends_path(@user.screen_name)} .col-md-6.col-sm-6.col-xs-6 %h4.entry-text#friend-count= @user.friend_count %h6.entry-subtext Following diff --git a/config/routes.rb b/config/routes.rb index 6163309e..29c238c0 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -43,10 +43,10 @@ Rails.application.routes.draw do match '/@:username/a/:id', to: 'answer#show', via: 'get', as: :show_user_answer match '/@:username/q/:id', to: 'question#show', via: 'get', as: :show_user_question match '/@:username/followers(/p/:page)', to: 'user#followers', via: 'get', as: :show_user_followers, defaults: {page: 1} - match '/@:username/following(/p/:page)', to: 'user#following', via: 'get', as: :show_user_following, defaults: {page: 1} + match '/@:username/friends(/p/:page)', to: 'user#friends', via: 'get', as: :show_user_friends, defaults: {page: 1} match '/:username(/p/:page)', to: 'user#show', via: 'get', as: :show_user_profile_alt, defaults: {page: 1} match '/:username/a/:id', to: 'answer#show', via: 'get', as: :show_user_answer_alt match '/:username/q/:id', to: 'question#show', via: 'get', as: :show_user_question_alt match '/:username/followers(/p/:page)', to: 'user#followers', via: 'get', as: :show_user_followers_alt, defaults: {page: 1} - match '/:username/following(/p/:page)', to: 'user#following', via: 'get', as: :show_user_following_alt, defaults: {page: 1} + match '/:username/friends(/p/:page)', to: 'user#friends', via: 'get', as: :show_user_friends_alt, defaults: {page: 1} end