Commit a4a71f2f65d8d50fa7bd8980c3126ecb0641a225

Authored by Aurelio A. Heckert
Committed by Daniela Feitosa
1 parent bd63309c

ActionItem1074: a br tag with clear:both was appended to each post

Showing 1 changed file with 4 additions and 2 deletions   Show diff stats
app/helpers/blog_helper.rb
... ... @@ -29,7 +29,7 @@ module BlogHelper
29 29 css_add << 'last' if i == (artic_len-1)
30 30 css_add << 'not-published' if !art.published?
31 31 content << content_tag('div',
32   - display_post(art),
  32 + display_post(art) + '<br style="clear:both"/>',
33 33 :class => 'blog-post ' + css_add.join(' '),
34 34 :id => "post-#{art.id}")
35 35 end
... ... @@ -38,7 +38,9 @@ module BlogHelper
38 38 end
39 39  
40 40 def display_post(article)
41   - article_title(article) + content_tag('p', article.to_html)
  41 + html = article.to_html
  42 + html = content_tag('p', html) if ! html.include?('</p>')
  43 + article_title(article) + html
42 44 end
43 45  
44 46 end
... ...