Commit e0bfa89c authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Get contributed projects for last year only

parent 4dd573b4
...@@ -610,6 +610,7 @@ class User < ActiveRecord::Base ...@@ -610,6 +610,7 @@ class User < ActiveRecord::Base
def contributed_projects_ids def contributed_projects_ids
Event.where(author_id: self). Event.where(author_id: self).
where("created_at > ?", Time.now - 1.year).
code_push. code_push.
reorder(project_id: :desc). reorder(project_id: :desc).
select('DISTINCT(project_id)'). select('DISTINCT(project_id)').
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment