dev_aliyun
p31729568 5 years ago
parent 29c8a654e2
commit cacf256da3

@ -8,7 +8,7 @@ class LibrariesController < ApplicationController
libraries = Library.where(nil)
libraries =
if current_user.logged? && params[:type] == 'mine'
if User.current.logged? && params[:type] == 'mine'
libraries.where(user_id: current_user.id).order('created_at desc')
else
libraries.where(status: :published).order('visited_count desc')

Loading…
Cancel
Save