From 32849f1d1bd59fc7c7d5a1ed36c77914dc175ccc Mon Sep 17 00:00:00 2001 From: chris2tof Date: Thu, 25 Aug 2011 15:08:31 +0800 Subject: [PATCH] Set default design to first design --- app/controllers/admin/pages_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/pages_controller.rb b/app/controllers/admin/pages_controller.rb index e3fdbb20..5a5bc2c3 100644 --- a/app/controllers/admin/pages_controller.rb +++ b/app/controllers/admin/pages_controller.rb @@ -22,7 +22,7 @@ class Admin::PagesController < ApplicationController @item.is_published = true @item.parent_id = @parent_item.id rescue nil @designs = Design.all.entries - @default_design = @designs.detect {|d| d.title.to_s == 'Bob' } + @default_design = Design.first @default_theme = @default_design.themes.detect {|t| t.name.to_s == 'default' } end