20 lines
599 B
Ruby
20 lines
599 B
Ruby
|
class ExcellentOptionCourse < ActiveRecord::Migration
|
||
|
def up
|
||
|
arr = [151,122,15,227,139,410,291,224,55,137,414,43,417,52,205,44,216,132,204,258,411,50,
|
||
|
419,390,420,133,91,112,202,95,194,34,172,403,177,252,138,352,225,46,279,382,397,286,344,27,175,
|
||
|
124,265,88,59,110,72,92,392,413,26,201,94,57,156,393,154,12,262]
|
||
|
for i in 0..arr.length-1
|
||
|
begin
|
||
|
puts arr[i]
|
||
|
course = Course.find(arr[i])
|
||
|
course.update_attribute(:excellent_option, true)
|
||
|
rescue
|
||
|
logger.error("Course is not found!")
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
|
||
|
def down
|
||
|
end
|
||
|
end
|