平台管理员的首页报500

This commit is contained in:
daiao 2017-02-17 09:00:35 +08:00
parent cb5548c853
commit 2c42a51195
4 changed files with 2644 additions and 2617 deletions

View File

@ -783,8 +783,8 @@ class AdminController < ApplicationController
begin
#更新消息表的status
applied_message_id = aas.school_id
applied_message = AppliedMessage.where(:applied_id => applied_message_id, :applied_type => "ApplyAddSchools")
applied_message.update_all(:status => 2)
#applied_message = AppliedMessage.where(:applied_id => applied_message_id, :applied_type => "ApplyAddSchools")
#applied_message.update_all(:status => 2)
aas.update_attribute(:status, 2)
AppliedMessage.create(:user_id => aas.user_id, :status => 2, :viewed => 0, :applied_id => aas.id, :applied_type => "ApplyAddSchools", :name => school[0].name )
users = UserExtensions.where("school_id = #{aas.school_id}")

View File

@ -3,7 +3,7 @@
“<%= ma.name %>”的申请,已通过审核。谢谢!
</a>
<% elsif ma.status == 2 %>
<a class ="#{ma.viewed == 0 ? 'newsBlack' : 'newsGrey'}" target = '_blank' title="“<%= ma.applied.name %>”的申请,因名称不符合规范,系统已将其更改为“<%= ma.name %>”。谢谢!">
<a class ="#{ma.viewed == 0 ? 'newsBlack' : 'newsGrey'}" target = '_blank' title="“<%= ma.applied.name %>”的申请,因名称不符合规范,系统已将其更改为“<%= ma.name %>”。谢谢!">
“<%= ma.applied.name %>”的申请,因名称不符合规范,系统已将其更改为“<%= ma.name %>”。谢谢!
</a>
<% elsif ma.status == 3 %>

View File

@ -0,0 +1,9 @@
class UpdateAppliedMessagesStatus < ActiveRecord::Migration
def up
sql = "update applied_messages set status = 1 where applied_id in(2495, 2496, 2497)"
execute(sql)
end
def down
end
end

File diff suppressed because it is too large Load Diff