Change to MongoDB
This commit is contained in:
1 parent
fd8f9cace5
commit
b17ebfb9b7
8 files changed
+55
-44
No files matched your search
@@ -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'
|
||||
|
||||
Reference in new issue
Block a user