commit
cf1b78b42b
@ -1,2 +1,2 @@
|
||||
$("#test_send_<%= @index%>").replaceWith("<a class='<%= @result == 0 ? 'green_btn' : 'red_btn'%> fl ml5 mt1' onclick='programing_test(<%= @index%>)' id='test_send_<%= @index%>'><%= @result == 0 ? '正确' : '错误'%></a>");
|
||||
$("#test_send_<%= @index%>").replaceWith("<a class='<%= @result == 0 ? 'green_btn' : 'red_btn'%> fl ml5 mt1 programing_test' onclick='programing_test(<%= @index%>)' id='test_send_<%= @index%>'><%= @result == 0 ? '正确' : '错误'%></a>");
|
||||
$("#test_result_<%= @index%>").val("<%= @result%>");
|
@ -0,0 +1,9 @@
|
||||
class ChangeResultDefault < ActiveRecord::Migration
|
||||
def up
|
||||
change_column :homework_tests,:result,:integer,:default => nil
|
||||
end
|
||||
|
||||
def down
|
||||
change_column :homework_tests,:result,:integer,:default => 0
|
||||
end
|
||||
end
|
Loading…
Reference in new issue