renamed following to friends

This commit is contained in:
nilsding 2014-12-08 19:51:34 +01:00
parent e63e52f585
commit c18ac74700
4 changed files with 5 additions and 5 deletions

View File

@ -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])

View File

@ -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

View File

@ -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

View File

@ -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