From 6b4e2ae37b55b1fcdcecef67e3655cf693ae288c Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Tue, 16 Sep 2014 09:33:27 +0800
Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E7=AB=9E=E8=B5=9B=E4=BD=9C?=
=?UTF-8?q?=E5=93=81=E5=88=86=E7=B1=BB=E4=B8=8B=E6=8B=89=E5=88=97=E8=A1=A8?=
=?UTF-8?q?=E9=80=89=E9=A1=B9=202.=E4=BF=AE=E6=94=B9=E7=AB=9E=E8=B5=9B?=
=?UTF-8?q?=E6=A0=87=E9=A2=98=E4=B8=BA=E5=85=A8=E9=83=A8=E6=98=BE=E7=A4=BA?=
=?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E6=80=9D=E8=B7=AF=EF=BC=9A=E6=9B=B4?=
=?UTF-8?q?=E6=94=B9=E6=95=B0=E6=8D=AE=E5=BA=93=E6=95=B0=E6=8D=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/layouts/base_newcontest.html.erb | 2 +-
.../20140916005319_update_works_categories.rb | 26 +++++++++++++++
db/schema.rb | 32 +++++++++----------
3 files changed, 42 insertions(+), 18 deletions(-)
create mode 100644 db/migrate/20140916005319_update_works_categories.rb
diff --git a/app/views/layouts/base_newcontest.html.erb b/app/views/layouts/base_newcontest.html.erb
index 9fef1e3e6..c8e78d7f5 100644
--- a/app/views/layouts/base_newcontest.html.erb
+++ b/app/views/layouts/base_newcontest.html.erb
@@ -65,7 +65,7 @@
- <%= link_to h(truncate(@contest.name, length: 13, omission: '...')), show_contest_contest_path(@contest) %> |
+ <%= link_to @contest.name, show_contest_contest_path(@contest) %> |
<% if User.current.login? %>
diff --git a/db/migrate/20140916005319_update_works_categories.rb b/db/migrate/20140916005319_update_works_categories.rb
new file mode 100644
index 000000000..e4cf812bf
--- /dev/null
+++ b/db/migrate/20140916005319_update_works_categories.rb
@@ -0,0 +1,26 @@
+# -*coding:utf-8 -*-
+class UpdateWorksCategories < ActiveRecord::Migration
+ def up
+ WorksCategory.all.each do |wc|
+ wc.destroy
+ end
+
+ workscategory1 = WorksCategory.new
+ workscategory1.category = "开源软件"
+ workscategory1.save
+
+ workscategory2 = WorksCategory.new
+ workscategory2.category = "移动APP"
+ workscategory2.save
+
+ workscategory3 = WorksCategory.new
+ workscategory3.category = "其他"
+ workscategory3.save
+ end
+
+ def down
+ WorksCategory.all.each do |wc|
+ wc.destroy
+ end
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 95c52cca3..ebf24f547 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 => 20140826072838) do
+ActiveRecord::Schema.define(:version => 20140916005319) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -878,18 +878,18 @@ ActiveRecord::Schema.define(:version => 20140826072838) do
create_table "relative_memos", :force => true do |t|
t.integer "osp_id"
t.integer "parent_id"
- t.string "subject", :null => false
- t.text "content", :null => false
+ t.string "subject", :null => false
+ t.text "content", :limit => 16777215, :null => false
t.integer "author_id"
- t.integer "replies_count", :default => 0
+ t.integer "replies_count", :default => 0
t.integer "last_reply_id"
- t.boolean "lock", :default => false
- t.boolean "sticky", :default => false
- t.boolean "is_quote", :default => false
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- t.integer "viewed_count_crawl", :default => 0
- t.integer "viewed_count_local", :default => 0
+ t.boolean "lock", :default => false
+ t.boolean "sticky", :default => false
+ t.boolean "is_quote", :default => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.integer "viewed_count_crawl", :default => 0
+ t.integer "viewed_count_local", :default => 0
t.string "url"
t.string "username"
t.string "userhomeurl"
@@ -976,10 +976,11 @@ ActiveRecord::Schema.define(:version => 20140826072838) do
t.string "url"
t.string "title"
t.integer "share_type"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.integer "project_id"
t.integer "user_id"
+ t.string "description"
end
create_table "softapplications", :force => true do |t|
@@ -1085,8 +1086,8 @@ ActiveRecord::Schema.define(:version => 20140826072838) do
t.integer "zip_code"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
- t.integer "identity"
t.string "technical_title"
+ t.integer "identity"
t.string "student_id"
t.string "teacher_realname"
t.string "student_realname"
@@ -1144,9 +1145,6 @@ ActiveRecord::Schema.define(:version => 20140826072838) do
t.integer "active"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
- t.integer "level"
- t.integer "file"
- t.integer "issue"
end
create_table "user_statuses", :force => true do |t|
|