From 01bea0025332fc0fcaade123832608feb0acc6d4 Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Thu, 5 Dec 2013 14:20:09 -0300 Subject: [PATCH] Fix bug with the new image field at suggest article --- app/views/shared/_lead_and_body.rhtml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/shared/_lead_and_body.rhtml b/app/views/shared/_lead_and_body.rhtml index 445ab22..1a6b334 100644 --- a/app/views/shared/_lead_and_body.rhtml +++ b/app/views/shared/_lead_and_body.rhtml @@ -14,8 +14,10 @@
- <% fields_for 'article[image_builder]', @article.image do |i| %> - <%= file_field_or_thumbnail(_('Image:'), @article.image, i) %> + <% if @article %> + <% fields_for 'article[image_builder]', @article.image do |i| %> + <%= file_field_or_thumbnail(_('Image:'), @article.image, i) %> + <% end %> <% end %> <% if f %> -- libgit2 0.21.2