From 71ae4dd3d2dbafc1ef6e7716c379d01ea194aafe Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 19 Mar 2016 14:02:30 +0100 Subject: Adding public following and followers pages, fix #3 --- app/controllers/accounts_controller.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/controllers/accounts_controller.rb') diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index c46200811..374591a5c 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -13,6 +13,14 @@ class AccountsController < ApplicationController end end + def followers + @followers = @account.followers.paginate(page: params[:page], per_page: 6) + end + + def following + @following = @account.following.paginate(page: params[:page], per_page: 6) + end + private def set_account -- cgit