minor refactoring for follows

This commit is contained in:
rgarcia
2017-07-19 13:52:38 +02:00
parent 57c8887077
commit b7ef755b16
3 changed files with 14 additions and 8 deletions

View File

@@ -68,8 +68,7 @@ class UsersController < ApplicationController
end
def load_follows
@followable_types = @user.follows.pluck(:followable_type).uniq
@follows = @user.follows
@follows = @user.follows.group_by(&:followable_type)
end
def valid_access?