diff --git a/app/views/homework_attach/edit.html.erb b/app/views/homework_attach/edit.html.erb
index a0876440c..fae1f97b5 100644
--- a/app/views/homework_attach/edit.html.erb
+++ b/app/views/homework_attach/edit.html.erb
@@ -44,7 +44,7 @@
<%= form_for(@homework) do |f|%>
标 题 *:
- <%= f.text_field :name, :required => true, :name => "homework_name", :size => 60, :style => "width:490px;"%>
+ <%= f.text_field :name, :required => true, :name => "homework_name", :size => 60, :style => "width:490px;", :maxlength => 254%>
提交项目 :
@@ -60,7 +60,7 @@
描 述 :
- <%= f.text_area :description, :rows => 8, :name => "homework_description", :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %>
+ <%= f.text_area :description, :rows => 8, :name => "homework_description", :class => 'wiki-edit', :maxlength => 65534, :style => "font-size:small;width:490px;margin-left:10px;" %>
diff --git a/app/views/homework_attach/new.html.erb b/app/views/homework_attach/new.html.erb
index d05dfb735..29e606442 100644
--- a/app/views/homework_attach/new.html.erb
+++ b/app/views/homework_attach/new.html.erb
@@ -24,7 +24,7 @@
}) do |f|%>
标 题 *:
- <%= f.text_field "name", :required => true, :size => 60, :style => "width:490px;" %>
+ <%= f.text_field "name", :required => true, :size => 60, :style => "width:490px;", :maxlength => 254 %>
提交项目 :
@@ -39,7 +39,7 @@
<%#= f.text_area :description, :rows => 15, :class => 'wiki-edit', :id => 'editor01' %>
-->
- <%= f.text_area "description", :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %>
+ <%= f.text_area "description", :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;", :maxlength => 65534 %>
diff --git a/db/migrate/20141009055029_update_homeworkattach_description.rb b/db/migrate/20141009055029_update_homeworkattach_description.rb
new file mode 100644
index 000000000..7f107077f
--- /dev/null
+++ b/db/migrate/20141009055029_update_homeworkattach_description.rb
@@ -0,0 +1,5 @@
+class UpdateHomeworkattachDescription < ActiveRecord::Migration
+ def change
+ change_column :homework_attaches, :description, :text, default: nil
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 172a11ec5..ea5c2107d 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 => 20141009010934) do
+ActiveRecord::Schema.define(:version => 20141009055029) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -473,7 +473,7 @@ ActiveRecord::Schema.define(:version => 20141009010934) do
t.datetime "updated_at", :null => false
t.string "reward"
t.string "name"
- t.string "description"
+ t.text "description"
t.integer "state"
t.integer "project_id", :default => 0
end