平台管理员的首页报500
This commit is contained in:
parent
cb5548c853
commit
2c42a51195
|
@ -783,8 +783,8 @@ class AdminController < ApplicationController
|
||||||
begin
|
begin
|
||||||
#更新消息表的status
|
#更新消息表的status
|
||||||
applied_message_id = aas.school_id
|
applied_message_id = aas.school_id
|
||||||
applied_message = AppliedMessage.where(:applied_id => applied_message_id, :applied_type => "ApplyAddSchools")
|
#applied_message = AppliedMessage.where(:applied_id => applied_message_id, :applied_type => "ApplyAddSchools")
|
||||||
applied_message.update_all(:status => 2)
|
#applied_message.update_all(:status => 2)
|
||||||
aas.update_attribute(: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 )
|
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}")
|
users = UserExtensions.where("school_id = #{aas.school_id}")
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
“<%= ma.name %>”的申请,已通过审核。谢谢!
|
“<%= ma.name %>”的申请,已通过审核。谢谢!
|
||||||
</a>
|
</a>
|
||||||
<% elsif ma.status == 2 %>
|
<% 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 %>”。谢谢!
|
“<%= ma.applied.name %>”的申请,因名称不符合规范,系统已将其更改为“<%= ma.name %>”。谢谢!
|
||||||
</a>
|
</a>
|
||||||
<% elsif ma.status == 3 %>
|
<% elsif ma.status == 3 %>
|
||||||
|
|
|
@ -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
|
5246
db/schema.rb
5246
db/schema.rb
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue