个人动态里回复缺陷留言增加登录判断

This commit is contained in:
sw 2015-09-06 16:31:15 +08:00
parent 9f8fee8267
commit 29379788fe
1 changed files with 10 additions and 8 deletions

View File

@ -386,14 +386,16 @@ class IssuesController < ApplicationController
end
def add_journal
jour = Journal.new
jour.user_id = User.current.id
jour.notes = params[:notes]
jour.journalized = @issue
jour.save
@user_activity_id = params[:user_activity_id]
respond_to do |format|
format.js
if User.current.logged?
jour = Journal.new
jour.user_id = User.current.id
jour.notes = params[:notes]
jour.journalized = @issue
jour.save
@user_activity_id = params[:user_activity_id]
respond_to do |format|
format.js
end
end
end