报错问题

dev_local_scyd
daiao 5 years ago
parent 4e6d70d51a
commit a4c4d6857f

@ -1,5 +1,6 @@
class MessagesController < ApplicationController
include MessagesHelper
include ApplicationHelper
SORT_TYPE = %w[time hot]

@ -2,6 +2,7 @@ class UsersController < ApplicationController
before_action :load_user, only: [:show, :homepage_info]
before_action :check_user_exist, only: [:show, :homepage_info]
include ApplicationHelper
# 检查是否更新
def system_update
@ -78,11 +79,9 @@ class UsersController < ApplicationController
# 用户回复功能
def reply_message
message = JournalsForMessage.new(reply_message_params)
message.user_id = current_user.id
message.save!
render_ok(id: message.id)
@message = JournalsForMessage.new(reply_message_params)
@message.user_id = current_user.id
@message.save!
end
# 搜索用户具有管理员角色的项目

@ -1,6 +1,7 @@
json.partial! "commons/success"
json.data do
json.id @reply.id
json.content content_safe(@reply.content)
json.author do
json.partial! "users/user_simple", user: @reply.author
end

@ -0,0 +1,4 @@
json.status 0
json.message "success"
json.id @message.id
json.content content_safe(@message.content)
Loading…
Cancel
Save