mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-20 11:45:57 +08:00
add: user project trends
This commit is contained in:
11
app/controllers/users/project_trends_controller.rb
Normal file
11
app/controllers/users/project_trends_controller.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class Users::ProjectTrendsController < Users::BaseController
|
||||
|
||||
def index
|
||||
if params[:date].present?
|
||||
@project_trends = observed_user.project_trends.where("DATE(created_at) = ?", params[:date])
|
||||
else
|
||||
@project_trends = observed_user.project_trends
|
||||
end
|
||||
@project_trends = kaminari_paginate(@project_trends.includes(:trend, :project).order(created_at: :desc))
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user