Commit 94fd9a6e4713d26bcf8bbfa91b53b84810567d8c
1 parent
8a9e90da
Exists in
master
and in
4 other branches
Added issue description.
Showing
4 changed files
with
15 additions
and
5 deletions
Show diff stats
app/models/issue.rb
@@ -24,6 +24,10 @@ class Issue < ActiveRecord::Base | @@ -24,6 +24,10 @@ class Issue < ActiveRecord::Base | ||
24 | validates :title, | 24 | validates :title, |
25 | :presence => true, | 25 | :presence => true, |
26 | :length => { :within => 0..255 } | 26 | :length => { :within => 0..255 } |
27 | + | ||
28 | + validates :description, | ||
29 | + :presence => true, | ||
30 | + :length => { :within => 0..2000 } | ||
27 | 31 | ||
28 | scope :critical, where(:critical => true) | 32 | scope :critical, where(:critical => true) |
29 | scope :non_critical, where(:critical => false) | 33 | scope :non_critical, where(:critical => false) |
@@ -57,6 +61,7 @@ end | @@ -57,6 +61,7 @@ end | ||
57 | # | 61 | # |
58 | # id :integer not null, primary key | 62 | # id :integer not null, primary key |
59 | # title :string(255) | 63 | # title :string(255) |
64 | +# description :text | ||
60 | # assignee_id :integer | 65 | # assignee_id :integer |
61 | # author_id :integer | 66 | # author_id :integer |
62 | # project_id :integer | 67 | # project_id :integer |
app/views/issues/_form.html.haml
@@ -9,8 +9,12 @@ | @@ -9,8 +9,12 @@ | ||
9 | %li= msg | 9 | %li= msg |
10 | 10 | ||
11 | .clearfix | 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 | .clearfix | 19 | .clearfix |
16 | = f.label :assignee_id | 20 | = f.label :assignee_id |
app/views/issues/show.html.haml
1 | -%h3 | ||
2 | - Issue ##{@issue.id} | 1 | +%h3 |
2 | + @issue.title | ||
3 | %small | 3 | %small |
4 | created at | 4 | created at |
5 | = @issue.created_at.stamp("Aug 21, 2011") | 5 | = @issue.created_at.stamp("Aug 21, 2011") |
@@ -43,7 +43,7 @@ | @@ -43,7 +43,7 @@ | ||
43 | 43 | ||
44 | %hr | 44 | %hr |
45 | 45 | ||
46 | - %div= simple_format @issue.title | 46 | + %div= simple_format @issue.description |
47 | 47 | ||
48 | 48 | ||
49 | .issue_notes#notes= render "notes/notes", :tid => @issue.id, :tt => "issue" | 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,6 +27,7 @@ ActiveRecord::Schema.define(:version => 20120307095918) do | ||
27 | 27 | ||
28 | create_table "issues", :force => true do |t| | 28 | create_table "issues", :force => true do |t| |
29 | t.string "title" | 29 | t.string "title" |
30 | + t.text "description" | ||
30 | t.integer "assignee_id" | 31 | t.integer "assignee_id" |
31 | t.integer "author_id" | 32 | t.integer "author_id" |
32 | t.integer "project_id" | 33 | t.integer "project_id" |