Commit 8bf7a64b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Get contributed projects only if push event exists

Conflicts:
	app/models/user.rb
parent 87bf35df
...@@ -607,4 +607,12 @@ class User < ActiveRecord::Base ...@@ -607,4 +607,12 @@ class User < ActiveRecord::Base
def oauth_authorized_tokens def oauth_authorized_tokens
Doorkeeper::AccessToken.where(resource_owner_id: self.id, revoked_at: nil) Doorkeeper::AccessToken.where(resource_owner_id: self.id, revoked_at: nil)
end end
def contributed_projects_ids
Event.where(author_id: self).
code_push.
reorder(project_id: :desc).
select('DISTINCT(project_id)').
map(&:project_id)
end
end end
%h4 Calendar %h4 Commits calendar
#cal-heatmap.calendar #cal-heatmap.calendar
:javascript :javascript
new calendar( new calendar(
......
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