From 83ff449946ed50209a466b2430cd3579dfe40287 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 22 Jan 2016 21:51:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E3=80=81=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E8=B5=84=E6=BA=90=20=E6=B5=8F=E8=A7=88=20=E6=94=B9?= =?UTF-8?q?=E6=88=90=20=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/locales/zh.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/zh.yml b/config/locales/zh.yml index daa0c3a31..e9d3ed813 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -674,7 +674,7 @@ zh: label_day_plural: 天 label_repository: 版本库 label_course_repository: 代码库 - label_browse: 浏览 + label_browse: 上传文件 label_branch: 分支 label_tag: 标签 label_revision: 修订 From dfb8a3afbf1eeca98b38b0d91746a417015120ac Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 22 Jan 2016 22:35:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20160122142844_excellent_course_se.rb | 17 +++++++++++++++++ .../20160122143138_excellent_option_se.rb | 19 +++++++++++++++++++ db/schema.rb | 3 +-- 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20160122142844_excellent_course_se.rb create mode 100644 db/migrate/20160122143138_excellent_option_se.rb diff --git a/db/migrate/20160122142844_excellent_course_se.rb b/db/migrate/20160122142844_excellent_course_se.rb new file mode 100644 index 000000000..c6f5dbb88 --- /dev/null +++ b/db/migrate/20160122142844_excellent_course_se.rb @@ -0,0 +1,17 @@ +class ExcellentCourseSe < ActiveRecord::Migration + def up + arr = [302,192,370,394,183,361,117,218,379,178,418,203,342,403,225] + for i in 0..arr.length-1 + begin + puts arr[i] + course = Course.find(arr[i]) + course.update_attribute(:is_excellent, true) + rescue + logger.error("Course is not found!") + end + end + end + + def down + end +end diff --git a/db/migrate/20160122143138_excellent_option_se.rb b/db/migrate/20160122143138_excellent_option_se.rb new file mode 100644 index 000000000..cee739b7f --- /dev/null +++ b/db/migrate/20160122143138_excellent_option_se.rb @@ -0,0 +1,19 @@ +class ExcellentOptionSe < 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 diff --git a/db/schema.rb b/db/schema.rb index b31ebc5c2..b2c74a96c 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20160122094829) do +ActiveRecord::Schema.define(:version => 20160122143138) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -1371,7 +1371,6 @@ ActiveRecord::Schema.define(:version => 20160122094829) do t.integer "changeset_num", :default => 0 t.integer "board_message_num", :default => 0 t.integer "board_num", :default => 0 - t.integer "act_num", :default => 0 t.integer "attach_num", :default => 0 t.datetime "commit_time" end