From 9611a27e0ca7e800d978d7355dbfb896f6f6cd2c Mon Sep 17 00:00:00 2001 From: gitlabhq Date: Thu, 27 Oct 2011 17:33:20 +0300 Subject: [PATCH] note as text --- app/models/note.rb | 2 +- app/views/notes/_form.html.haml | 2 +- db/migrate/20111027142641_change_note_note_to_text.rb | 8 ++++++++ db/schema.rb | 4 ++-- 4 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 db/migrate/20111027142641_change_note_note_to_text.rb diff --git a/app/models/note.rb b/app/models/note.rb index 9dcdbb55..645bc7ce 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -13,7 +13,7 @@ class Note < ActiveRecord::Base validates :note, :presence => true, - :length => { :within => 0..255 } + :length => { :within => 0..5000 } validates :attachment, :file_size => { diff --git a/app/views/notes/_form.html.haml b/app/views/notes/_form.html.haml index 14e74fa6..86f0b779 100644 --- a/app/views/notes/_form.html.haml +++ b/app/views/notes/_form.html.haml @@ -10,7 +10,7 @@ %div = f.label :note - %cite (255 symbols only) + %cite %br = f.text_area :note, :size => 255 diff --git a/db/migrate/20111027142641_change_note_note_to_text.rb b/db/migrate/20111027142641_change_note_note_to_text.rb new file mode 100644 index 00000000..d762d361 --- /dev/null +++ b/db/migrate/20111027142641_change_note_note_to_text.rb @@ -0,0 +1,8 @@ +class ChangeNoteNoteToText < ActiveRecord::Migration + def up + change_column :notes, :note, :text + end + + def down + end +end diff --git a/db/schema.rb b/db/schema.rb index 21c224d4..8dd75e75 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 => 20111025134235) do +ActiveRecord::Schema.define(:version => 20111027142641) do create_table "issues", :force => true do |t| t.string "title" @@ -36,7 +36,7 @@ ActiveRecord::Schema.define(:version => 20111025134235) do end create_table "notes", :force => true do |t| - t.string "note" + t.text "note", :limit => 255 t.string "noteable_id" t.string "noteable_type" t.integer "author_id"