base layout on id instead of name

This commit is contained in:
chris authored and ihower committed 2011-04-13 18:22:51 +08:00
1 parent 6e100d3499
commit fc98757772
3 files changed
+7 -7

No files matched your search

+3 -3
View File
@@ -15,10 +15,10 @@ class Page < Item
def setup_default_value
super
if self.layout_name
self.layout_id = Layout.first(:conditions => {:name => self.layout_name} ).id
if self.layout_id
self.layout_name = Layout.find(layout_id).name
end
end
end
end