Merge branch 'hjq_beidou' into develop

This commit is contained in:
huang 2016-04-24 10:53:23 +08:00
commit cc48fb5a98
2 changed files with 43 additions and 35 deletions

View File

@ -1,5 +1,6 @@
class UpdateOneStudentScore < ActiveRecord::Migration
def up
begin
student_work_score = StudentWorksScore.where("user_id = 11688 AND student_work_id = 34414").first
student_work_score.score = 100
student_work_score.save
@ -31,6 +32,9 @@ class UpdateOneStudentScore < ActiveRecord::Migration
end
work.save
end
rescue => e
logger.error "[Errno::ENOENT] ===> #{e}"
end
end
def down

View File

@ -1,5 +1,6 @@
class UpdateOneStudentTeacherScore < ActiveRecord::Migration
def up
begin
work = StudentWork.find 49774
score = StudentWorksScore.new
score.score = 100
@ -10,6 +11,9 @@ class UpdateOneStudentTeacherScore < ActiveRecord::Migration
work.teacher_score = score.score
end
work.save
rescue => e
logger.error "[Errno::ENOENT] ===> #{e}"
end
end
def down