组织编辑500问题

作业列表500问题
This commit is contained in:
huang 2016-04-01 09:33:50 +08:00
parent f662bfa40b
commit 4cca290592
2 changed files with 7 additions and 2 deletions

View File

@ -41,7 +41,12 @@ class OrganizationsController < ApplicationController
end
def edit
@organization = Organization.find(params[:id])
# @organization = Organization.find(params[:id])
begin
@organization = Organization.where("id =?", params[:id])
ensure
render_404
end
end
def destroy

View File

@ -35,7 +35,7 @@
<%=@count %>
</td>
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=homework.name%>'>
<%=link_to(homework.name, student_work_index_path(:homework => homework.id))%>
<%=link_to(homework.try(:name), student_work_index_path(:homework => homework.id))%>
</td>
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=homework.course.name%>'>
<%= link_to(homework.course.name, course_path(homework.course.id)) %>