Merge branch 'dev_zanle' into szzh
This commit is contained in:
commit
a009c5a023
|
@ -1,23 +0,0 @@
|
||||||
*.swp
|
|
||||||
/.project
|
|
||||||
/.idea
|
|
||||||
/.bundle
|
|
||||||
*.swp
|
|
||||||
/config/database.yml
|
|
||||||
/config/configuration.yml
|
|
||||||
/files/*
|
|
||||||
/log/*
|
|
||||||
/public/tmp/*
|
|
||||||
/tmp/*
|
|
||||||
/public/cache/*
|
|
||||||
.gitignore
|
|
||||||
/config/newrelic.yml
|
|
||||||
/public/images/avatars/*
|
|
||||||
/Gemfile
|
|
||||||
/Gemfile.lock
|
|
||||||
/db/schema.rb
|
|
||||||
/Gemfile.lock
|
|
||||||
/lib/plugins/acts_as_versioned/test/debug.log
|
|
||||||
.rbenv-gemsets
|
|
||||||
.DS_Store
|
|
||||||
public/api_doc/
|
|
|
@ -154,7 +154,7 @@ class IssuesController < ApplicationController
|
||||||
call_hook(:controller_issues_new_before_save, { :params => params, :issue => @issue })
|
call_hook(:controller_issues_new_before_save, { :params => params, :issue => @issue })
|
||||||
@issue.save_attachments(params[:attachments] || (params[:issue] && params[:issue][:uploads]))
|
@issue.save_attachments(params[:attachments] || (params[:issue] && params[:issue][:uploads]))
|
||||||
# 给该issue在它所在的项目中所有的issues中所在的位置给一个序号
|
# 给该issue在它所在的项目中所有的issues中所在的位置给一个序号
|
||||||
@issue.project_issues_index = @issue.project.issues.last.project_issues_index + 1
|
@issue.project_issues_index = @issue.project.issues.last.nil? ? 1 : @issue.project.issues.last.project_issues_index + 1
|
||||||
if @issue.save
|
if @issue.save
|
||||||
call_hook(:controller_issues_new_after_save, { :params => params, :issue => @issue})
|
call_hook(:controller_issues_new_after_save, { :params => params, :issue => @issue})
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|
|
@ -164,8 +164,11 @@ class Message < ActiveRecord::Base
|
||||||
# Author lizanle
|
# Author lizanle
|
||||||
# Description
|
# Description
|
||||||
def act_as_forge_activity
|
def act_as_forge_activity
|
||||||
self.forge_acts << ForgeActivity.new(:user_id => self.author_id,
|
# 如果project为空,那么就是课程相关的消息
|
||||||
:project_id => self.board.project.id)
|
if !self.board.project.nil?
|
||||||
|
self.forge_acts << ForgeActivity.new(:user_id => self.author_id,
|
||||||
|
:project_id => self.board.project.id)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#更新用户分数 -by zjc
|
#更新用户分数 -by zjc
|
||||||
|
|
|
@ -98,8 +98,11 @@ class News < ActiveRecord::Base
|
||||||
# Author lizanle
|
# Author lizanle
|
||||||
# Description 公用表中也要记录
|
# Description 公用表中也要记录
|
||||||
def act_as_forge_activity
|
def act_as_forge_activity
|
||||||
self.forge_acts << ForgeActivity.new(:user_id => self.author_id,
|
# 如果是project为空,那么是课程相关的,不需要保存
|
||||||
:project_id => self.project.id)
|
if !self.project.nil?
|
||||||
|
self.forge_acts << ForgeActivity.new(:user_id => self.author_id,
|
||||||
|
:project_id => self.project.id)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue