Commit 56d9761844b2665e9e48d50f15f7ac3a63d60618

Authored by gitlabhq
1 parent 2258db66

moving out of body

app/models/issue.rb
@@ -14,9 +14,9 @@ class Issue < ActiveRecord::Base @@ -14,9 +14,9 @@ class Issue < ActiveRecord::Base
14 :presence => true, 14 :presence => true,
15 :length => { :within => 0..255 } 15 :length => { :within => 0..255 }
16 16
17 - validates :content,  
18 - :presence => true,  
19 - :length => { :within => 0..2000 } 17 + #validates :content,
  18 + #:presence => true,
  19 + #:length => { :within => 0..2000 }
20 20
21 scope :critical, where(:critical => true) 21 scope :critical, where(:critical => true)
22 scope :non_critical, where(:critical => false) 22 scope :non_critical, where(:critical => false)
app/views/issues/_form.html.haml
@@ -7,10 +7,10 @@ @@ -7,10 +7,10 @@
7 7
8 .span-8 8 .span-8
9 = f.label :title 9 = f.label :title
10 - = f.text_field :title, :style => "width:450px"  
11 - .span-8  
12 - = f.label :content  
13 - = f.text_area :content, :style => "width:450px; height:130px" 10 + = f.text_area :title, :style => "width:450px; height:100px", :maxlength => 255
  11 + -#.span-8
  12 + -#= f.label :content
  13 + -#= f.text_area :content, :style => "width:450px; height:130px"
14 .span-8.append-bottom 14 .span-8.append-bottom
15 = f.label :assignee_id 15 = f.label :assignee_id
16 = f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select user" }) 16 = f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select user" })
app/views/issues/_show.html.haml
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 = truncate issue.assignee.name, :lenght => 20 7 = truncate issue.assignee.name, :lenght => 20
8 %td ##{issue.id} 8 %td ##{issue.id}
9 %td 9 %td
10 - = html_escape issue.title 10 + = truncate(html_escape(issue.title), :length => 50)
11 %br 11 %br
12 - if issue.critical 12 - if issue.critical
13 %span.tag.high critical 13 %span.tag.high critical
app/views/issues/show.html.haml
1 %h2 1 %h2
2 - = "Issue ##{@issue.id} - #{@issue.title}" 2 + = "Issue ##{@issue.id} - #{truncate @issue.title, :length => 50}"
3 3
4 .span-15 4 .span-15
5 - = simple_format html_escape(@issue.content)  
6 -  
7 -  
8 - .clear  
9 - %br 5 + -#= simple_format html_escape(@issue.content)
10 .issue_notes= render "notes/notes" 6 .issue_notes= render "notes/notes"
11 .span-8.right 7 .span-8.right
12 .span-8 8 .span-8
db/migrate/20111027152724_issue_conten_to_note.rb 0 → 100644
@@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
  1 +class IssueContenToNote < ActiveRecord::Migration
  2 + def up
  3 + raise "Not ready"
  4 + Issue.find_each(:batch_size => 100) do |issue|
  5 +
  6 + end
  7 + end
  8 +
  9 + def down
  10 + end
  11 +end