调用存储过程刷新项目提交次数

This commit is contained in:
z9hang 2014-07-31 10:21:11 +08:00
parent 321712bd94
commit 8a9e2b47ad
2 changed files with 4 additions and 1 deletions

View File

@ -103,6 +103,8 @@ class ProjectsController < ApplicationController
end
def index
#调用存储过程更新提交次数
ActiveRecord::Base.connection.execute("CALL sp_project_status_cursor();")
#Modified by nie
@project_type = params[:project_type].to_i
per_page_option = 10
@ -150,6 +152,7 @@ class ProjectsController < ApplicationController
end
@projects = @projects.offset(@project_pages.offset).limit(@project_pages.per_page)
respond_to do |format|
format.html {
render :layout => 'base'

View File

@ -45,7 +45,7 @@
</tr>
<tr>
<td style="width: 50%;text-align: right;font-size: 17px;color: rgb(17, 102, 153)">
<% find_project_repository @project %>
<% #find_project_repository @project %>
<strong><%= content_tag('span', "#{@project.repository.nil? || @project.project_status.nil? ? '0' : @project.project_status.changesets_count }", :class => "info") %></strong>
</td>
<td style="width: 50%;text-align: left">