From 3ff2e7867eb6b4c29cac12438e164aba67ffd01a Mon Sep 17 00:00:00 2001 From: Christophe Vilayphiou Date: Mon, 20 Feb 2012 03:22:53 +0800 Subject: [PATCH] Fix bug when editing home --- app/views/admin/pages/_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/pages/_form.html.erb b/app/views/admin/pages/_form.html.erb index ecabdd13..c0cb433d 100644 --- a/app/views/admin/pages/_form.html.erb +++ b/app/views/admin/pages/_form.html.erb @@ -1,5 +1,5 @@ <%= f.error_messages %> -<%= f.hidden_field :parent, :value => @item.parent.id %> +<%= f.hidden_field :parent, :value => (@item.parent.id rescue nil) %>

<%= f.label :name, t('admin.name') %>