1.修改竞赛作品分类下拉列表选项

2.修改竞赛标题为全部显示
修改思路:更改数据库数据
This commit is contained in:
sw 2014-09-16 09:33:27 +08:00
parent 3ef05e64b8
commit 6b4e2ae37b
3 changed files with 42 additions and 18 deletions

View File

@ -65,7 +65,7 @@
<td>
<table>
<tr>
<td class="info_font" title="<%= @contest.name%>"><%= link_to h(truncate(@contest.name, length: 13, omission: '...')), show_contest_contest_path(@contest) %></td>
<td class="info_font" title="<%= @contest.name%>"><%= link_to @contest.name, show_contest_contest_path(@contest) %></td>
</tr>
<% if User.current.login? %>
<tr colspan='3'>

View File

@ -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

View File

@ -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|