Recent push event
This commit is contained in:
parent
40af6e1ad2
commit
e0d1fba15e
11 changed files with 70 additions and 11 deletions
|
@ -15,6 +15,8 @@ class ProjectsController < ApplicationController
|
|||
@projects = @projects.page(params[:page]).per(40)
|
||||
@events = Event.where(:project_id => current_user.projects.map(&:id)).recent.limit(20)
|
||||
|
||||
@last_push = current_user.recent_push
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.atom { render :layout => false }
|
||||
|
@ -69,6 +71,7 @@ class ProjectsController < ApplicationController
|
|||
respond_to do |format|
|
||||
format.html do
|
||||
if @project.repo_exists? && @project.has_commits?
|
||||
@last_push = current_user.recent_push(@project.id)
|
||||
render :show
|
||||
else
|
||||
render "projects/empty"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue