Commit 94fd9a6e4713d26bcf8bbfa91b53b84810567d8c

Authored by Steven Verbeek
1 parent 8a9e90da

Added issue description.

app/models/issue.rb
... ... @@ -24,6 +24,10 @@ class Issue < ActiveRecord::Base
24 24 validates :title,
25 25 :presence => true,
26 26 :length => { :within => 0..255 }
  27 +
  28 + validates :description,
  29 + :presence => true,
  30 + :length => { :within => 0..2000 }
27 31  
28 32 scope :critical, where(:critical => true)
29 33 scope :non_critical, where(:critical => false)
... ... @@ -57,6 +61,7 @@ end
57 61 #
58 62 # id :integer not null, primary key
59 63 # title :string(255)
  64 +# description :text
60 65 # assignee_id :integer
61 66 # author_id :integer
62 67 # project_id :integer
... ...
app/views/issues/_form.html.haml
... ... @@ -9,8 +9,12 @@
9 9 %li= msg
10 10  
11 11 .clearfix
12   - = f.label :title, "Issue Message"
13   - .input= f.text_area :title, :maxlength => 255, :class => "xxlarge"
  12 + = f.label :title, "Issue Subject"
  13 + .input= f.text_field :title, :maxlength => 255
  14 +
  15 + .clearfix
  16 + = f.label :description, "Issue Description"
  17 + .input= f.text_area :description, :maxlength => 2000, :class => "xxlarge"
14 18  
15 19 .clearfix
16 20 = f.label :assignee_id
... ...
app/views/issues/show.html.haml
1   -%h3
2   - Issue ##{@issue.id}
  1 +%h3
  2 + @issue.title
3 3 %small
4 4 created at
5 5 = @issue.created_at.stamp("Aug 21, 2011")
... ... @@ -43,7 +43,7 @@
43 43  
44 44 %hr
45 45  
46   - %div= simple_format @issue.title
  46 + %div= simple_format @issue.description
47 47  
48 48  
49 49 .issue_notes#notes= render "notes/notes", :tid => @issue.id, :tt => "issue"
... ...
db/schema.rb
... ... @@ -27,6 +27,7 @@ ActiveRecord::Schema.define(:version => 20120307095918) do
27 27  
28 28 create_table "issues", :force => true do |t|
29 29 t.string "title"
  30 + t.text "description"
30 31 t.integer "assignee_id"
31 32 t.integer "author_id"
32 33 t.integer "project_id"
... ...