Set default design to first design

This commit is contained in:
chris2tof 2011-08-25 15:08:31 +08:00
parent c248b729db
commit 32849f1d1b
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ class Admin::PagesController < ApplicationController
@item.is_published = true @item.is_published = true
@item.parent_id = @parent_item.id rescue nil @item.parent_id = @parent_item.id rescue nil
@designs = Design.all.entries @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' } @default_theme = @default_design.themes.detect {|t| t.name.to_s == 'default' }
end end