修复新增作业后页面不会跳转的问题

This commit is contained in:
sw 2014-06-04 09:11:06 +08:00
parent 50171ad0f8
commit 66c9de94a8
2 changed files with 6 additions and 2 deletions

View File

@ -44,6 +44,8 @@ class HomeworkAttachController < ApplicationController
format.html { redirect_to project_for_bid_path @homework.bid }
format.json { head :no_content }
end
else
end
#end
end
@ -74,6 +76,7 @@ class HomeworkAttachController < ApplicationController
format.html { redirect_to project_for_bid_path @homework.bid }
format.json { head :no_content }
end
else
end
end
@ -84,6 +87,7 @@ class HomeworkAttachController < ApplicationController
format.html { redirect_to project_for_bid_path @homework.bid }
format.json { head :no_content }
end
else
end
end

View File

@ -1,6 +1,6 @@
<p style="font-weight: bold; color: rgb(237,137,36)" xmlns="http://www.w3.org/1999/html"> <%=raw l(:label_new_homework)%> </p>
<p style="font-weight: bold; color: rgb(237,137,36)" xmlns="http://www.w3.org/1999/html"> <%=h l(:label_new_homework)%> </p>
<div class="box">
<%= form_for('new_form', :remote => true, :method => :post,
<%= form_for('new_form', :method => :post,
:url => {:controller => 'homework_attach',
:action => 'create',
:user_id => User.current.id,