From c95e09837e6306dfdf4f6e9d2ca72f0e47e5f6df Mon Sep 17 00:00:00 2001 From: Evandro Junior Date: Thu, 18 Dec 2014 20:09:27 -0200 Subject: [PATCH] fixed bug does not recover saved published date --- app/views/cms/_text_fields.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/cms/_text_fields.html.erb b/app/views/cms/_text_fields.html.erb index b42a8ac..96bb370 100644 --- a/app/views/cms/_text_fields.html.erb +++ b/app/views/cms/_text_fields.html.erb @@ -1 +1 @@ -<%= labelled_form_field(_('Publish date'), date_field('article[published_at]', DateTime.current, '%Y-%m-%d', {:max_date => '+0d', :date_format => 'yy-mm-dd'}, {:id => "article_published_at"})) %> +<%= labelled_form_field(_('Publish date'), date_field('article[published_at]', @article.published_at || DateTime.current, '%Y-%m-%d', {:max_date => '+0d', :date_format => 'yy-mm-dd'}, {:id => "article_published_at"})) %> -- libgit2 0.21.2