Change to MongoDB

This commit is contained in:
Wen-Tien Chang committed 2010-01-04 15:52:30 +08:00
1 parent fd8f9cace5
commit b17ebfb9b7
8 files changed
+55 -44

No files matched your search

+2 -2
View File
@@ -13,8 +13,8 @@ class ApplicationController < ActionController::Base
if @page
@layout = @page.layout
@page_options ||= {}
@page_content = Liquid::Template.parse( @page.read_attribute( "content_#{I18n.locale}" ) ).render(@page_options)
@layout_content = (@page.layout)? @layout.read_attribute( "content_#{I18n.locale}" ) : "{{page_content}}"
@page_content = Liquid::Template.parse( @page.send( "content_#{I18n.locale}" ) ).render(@page_options)
@layout_content = (@page.layout)? @layout.send( "content_#{I18n.locale}" ) : "{{page_content}}"
render :text => Liquid::Template.parse(@layout_content).render( 'page_content' => @page_content )
else
render :text => '404 Not Found'