Add liquid template render
This commit is contained in:
		
							parent
							
								
									66604d00f4
								
							
						
					
					
						commit
						78e8c32969
					
				|  | @ -4,7 +4,7 @@ class PagesController < ApplicationController | |||
|     @page = Page.find_by_name(params[:page_name]) | ||||
|      | ||||
|     if @page | ||||
|       render :text => @page.content | ||||
|        render :text => Liquid::Template.parse(@page.content).render | ||||
|     else | ||||
|       render :text => '404 not found' | ||||
|     end | ||||
|  |  | |||
|  | @ -10,7 +10,7 @@ | |||
|    | ||||
|   <p> | ||||
|   <%= f.label :content, "Content" %> | ||||
|   <%= f.text_area :content %> | ||||
|   <%= f.text_area :content, :size => '100x30' %> | ||||
|   </p> | ||||
|    | ||||
|   <p> | ||||
|  |  | |||
|  | @ -10,7 +10,7 @@ | |||
|    | ||||
|   <p> | ||||
|   <%= f.label :content, "Content" %> | ||||
|   <%= f.text_area :content %> | ||||
|   <%= f.text_area :content, :size => '100x30' %> | ||||
|   </p> | ||||
|    | ||||
|   <p> | ||||
|  |  | |||
|  | @ -38,6 +38,7 @@ Rails::Initializer.run do |config| | |||
|   # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. | ||||
|   # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')] | ||||
|   # config.i18n.default_locale = :de | ||||
|   config.gem "liquid" | ||||
|    | ||||
| end | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue