作业描述最大长度限制为3000个字符
This commit is contained in:
parent
2a8df37cfc
commit
7e8ab97713
|
@ -36,7 +36,7 @@ class Bid < ActiveRecord::Base
|
|||
acts_as_attachable
|
||||
|
||||
NAME_LENGTH_LIMIT = 60
|
||||
DESCRIPTION_LENGTH_LIMIT = 250
|
||||
DESCRIPTION_LENGTH_LIMIT = 3000
|
||||
validates :name, length: {maximum: NAME_LENGTH_LIMIT}, presence: true
|
||||
validates :description, length: {maximum: DESCRIPTION_LENGTH_LIMIT}
|
||||
validates :author_id, presence: true
|
||||
|
|
|
@ -36,7 +36,8 @@
|
|||
:maxlength => Bid::DESCRIPTION_LENGTH_LIMIT %>
|
||||
</p>
|
||||
<% time = (Time.now + 3600 * 24).strftime('%Y-%m-%d') %>
|
||||
<p><%= f.text_field(:deadline, :required => true, :size => 60, :style => "width:150px;",:value => "#{time}", :onchange => "regexDeadLine();", :readonly => true) %>
|
||||
<p>
|
||||
<%= f.text_field(:deadline, :required => true, :size => 60, :style => "width:150px;",:value => "#{time}", :onchange => "regexDeadLine();", :readonly => true) %>
|
||||
<%= calendar_for('bid_deadline')%>
|
||||
<span id="bid_deadline_span">
|
||||
</span>
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class ChangeBidsDescriptionType < ActiveRecord::Migration
|
||||
def change
|
||||
change_column :bids, :description, :text, default: nil
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20141013023400) do
|
||||
ActiveRecord::Schema.define(:version => 20141029065917) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -98,7 +98,7 @@ ActiveRecord::Schema.define(:version => 20141013023400) do
|
|||
t.string "budget", :null => false
|
||||
t.integer "author_id"
|
||||
t.date "deadline"
|
||||
t.string "description"
|
||||
t.text "description"
|
||||
t.datetime "created_on", :null => false
|
||||
t.datetime "updated_on", :null => false
|
||||
t.integer "commit"
|
||||
|
|
Loading…
Reference in New Issue