Commit 9611a27e0ca7e800d978d7355dbfb896f6f6cd2c

Authored by gitlabhq
1 parent 5fe736ab

note as text

app/models/note.rb
@@ -13,7 +13,7 @@ class Note < ActiveRecord::Base @@ -13,7 +13,7 @@ class Note < ActiveRecord::Base
13 13
14 validates :note, 14 validates :note,
15 :presence => true, 15 :presence => true,
16 - :length => { :within => 0..255 } 16 + :length => { :within => 0..5000 }
17 17
18 validates :attachment, 18 validates :attachment,
19 :file_size => { 19 :file_size => {
app/views/notes/_form.html.haml
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 10
11 %div 11 %div
12 = f.label :note 12 = f.label :note
13 - %cite (255 symbols only) 13 + %cite
14 %br 14 %br
15 = f.text_area :note, :size => 255 15 = f.text_area :note, :size => 255
16 16
db/migrate/20111027142641_change_note_note_to_text.rb 0 → 100644
@@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
  1 +class ChangeNoteNoteToText < ActiveRecord::Migration
  2 + def up
  3 + change_column :notes, :note, :text
  4 + end
  5 +
  6 + def down
  7 + end
  8 +end
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 # 11 #
12 # It's strongly recommended to check this file into your version control system. 12 # It's strongly recommended to check this file into your version control system.
13 13
14 -ActiveRecord::Schema.define(:version => 20111025134235) do 14 +ActiveRecord::Schema.define(:version => 20111027142641) do
15 15
16 create_table "issues", :force => true do |t| 16 create_table "issues", :force => true do |t|
17 t.string "title" 17 t.string "title"
@@ -36,7 +36,7 @@ ActiveRecord::Schema.define(:version =&gt; 20111025134235) do @@ -36,7 +36,7 @@ ActiveRecord::Schema.define(:version =&gt; 20111025134235) do
36 end 36 end
37 37
38 create_table "notes", :force => true do |t| 38 create_table "notes", :force => true do |t|
39 - t.string "note" 39 + t.text "note", :limit => 255
40 t.string "noteable_id" 40 t.string "noteable_id"
41 t.string "noteable_type" 41 t.string "noteable_type"
42 t.integer "author_id" 42 t.integer "author_id"