mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
init project
This commit is contained in:
9
app/controllers/users/recent_contacts_controller.rb
Normal file
9
app/controllers/users/recent_contacts_controller.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class Users::RecentContactsController < Users::BaseController
|
||||
before_action :private_user_resources!
|
||||
|
||||
def index
|
||||
contacts = observed_user.recent_contacts.distinct
|
||||
contacts = contacts.where(laboratory_id: current_laboratory.id) unless current_laboratory.main_site?
|
||||
@contacts = contacts.order('private_messages.created_at DESC').limit(10).includes(:user_extension)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user