Add MongoMapper key_i18n support
This commit is contained in:
1 parent
a674e46c91
commit
5ab32baf88
7 files changed
+23
-36
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.send( "content_#{I18n.locale}" ) ).render(@page_options)
|
||||
@layout_content = (@page.layout)? @layout.send( "content_#{I18n.locale}" ) : "{{page_content}}"
|
||||
@page_content = Liquid::Template.parse( @page.content ).render(@page_options)
|
||||
@layout_content = (@page.layout)? @layout.content : "{{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