Remove user#lists action, view and route

This commit is contained in:
Andreas Nedbal 2022-04-15 18:55:45 +02:00 committed by Karina Kwiatek
parent bbaba17634
commit 583a3ba519
3 changed files with 0 additions and 21 deletions

View file

@ -71,17 +71,6 @@ class UserController < ApplicationController
end
# endregion
# region Lists
def lists
@user = User.where('LOWER(screen_name) = ?', params[:username].downcase).first!
@lists = if current_user == @user
@user.lists
else
@user.lists.where(private: false)
end.all
end
# endregion
def followers
@title = 'Followers'
@user = User.where('LOWER(screen_name) = ?', params[:username].downcase).includes(:profile).first!

View file

@ -1,9 +0,0 @@
%ul
- @lists.each do |list|
%li
- if list.private?
%i.fa.fa-lock
= list.display_name
- provide(:title, user_title(@user, 'lists'))
- parent_layout 'user/profile'

View file

@ -143,7 +143,6 @@ Rails.application.routes.draw do
match '/:username/followers(/p/:page)', to: 'user#followers', via: 'get', as: :show_user_followers, defaults: {page: 1}
match '/:username/followings(/p/:page)', to: 'user#followings', via: 'get', as: :show_user_followings, defaults: {page: 1}
match '/:username/friends(/p/:page)', to: redirect('/%{username}/followings/p/%{page}'), via: 'get', defaults: {page: 1}
match '/:username/lists(/p/:page)', to: 'user#lists', via: 'get', as: :show_user_lists, defaults: {page: 1}
match '/:username/questions(/p/:page)', to: 'user#questions', via: 'get', as: :show_user_questions, defaults: {page: 1}
match '/feedback/consent', to: 'feedback#consent', via: 'get', as: 'feedback_consent'