Commit a4a71f2f65d8d50fa7bd8980c3126ecb0641a225
Committed by
Daniela Feitosa
1 parent
bd63309c
Exists in
master
and in
28 other branches
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,7 +29,7 @@ module BlogHelper | ||
29 | css_add << 'last' if i == (artic_len-1) | 29 | css_add << 'last' if i == (artic_len-1) |
30 | css_add << 'not-published' if !art.published? | 30 | css_add << 'not-published' if !art.published? |
31 | content << content_tag('div', | 31 | content << content_tag('div', |
32 | - display_post(art), | 32 | + display_post(art) + '<br style="clear:both"/>', |
33 | :class => 'blog-post ' + css_add.join(' '), | 33 | :class => 'blog-post ' + css_add.join(' '), |
34 | :id => "post-#{art.id}") | 34 | :id => "post-#{art.id}") |
35 | end | 35 | end |
@@ -38,7 +38,9 @@ module BlogHelper | @@ -38,7 +38,9 @@ module BlogHelper | ||
38 | end | 38 | end |
39 | 39 | ||
40 | def display_post(article) | 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 | end | 44 | end |
43 | 45 | ||
44 | end | 46 | end |