BUG修正
This commit is contained in:
parent
1a4ee62853
commit
99c9f81aea
|
@ -805,6 +805,7 @@ class BidsController < ApplicationController
|
|||
@homework = @bid
|
||||
@course = Course.find_by_id(params[:course_id])
|
||||
@course_id = @course.id
|
||||
|
||||
render file: 'courses/new_homework', layout: 'base_courses'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -129,7 +129,7 @@ class Attachment < ActiveRecord::Base
|
|||
nil
|
||||
end
|
||||
|
||||
def filename=(arg)
|
||||
def filename=(arg)
|
||||
write_attribute :filename, sanitize_filename(arg.to_s)
|
||||
filename
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<h3><%=l(:label_course_new_homework)%></h3>
|
||||
|
||||
<%= labelled_form_for @homework, :url => {:controller => 'bids', :action => 'create_homework'} do |f| %>
|
||||
<%= labelled_form_for @homework, :url => {:controller => 'bids', :action => 'create_homework',:course_id=>@course.id} do |f| %>
|
||||
<div class="box tabular">
|
||||
<%= render :partial => 'homework_form', :locals => { :f => f } %>
|
||||
<%= submit_tag l(:button_create), :class => "enterprise" %>
|
||||
|
|
Loading…
Reference in New Issue