diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 195065b9..53d499ee 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -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 diff --git a/app/views/admin/pages/edit.html.erb b/app/views/admin/pages/edit.html.erb index f5ed1928..b9eb861b 100644 --- a/app/views/admin/pages/edit.html.erb +++ b/app/views/admin/pages/edit.html.erb @@ -10,7 +10,7 @@
<%= f.label :content, "Content" %> - <%= f.text_area :content %> + <%= f.text_area :content, :size => '100x30' %>
diff --git a/app/views/admin/pages/new.html.erb b/app/views/admin/pages/new.html.erb index 5026da7e..a1482467 100644 --- a/app/views/admin/pages/new.html.erb +++ b/app/views/admin/pages/new.html.erb @@ -10,7 +10,7 @@
<%= f.label :content, "Content" %> - <%= f.text_area :content %> + <%= f.text_area :content, :size => '100x30' %>
diff --git a/config/environment.rb b/config/environment.rb index 67a14735..7d8fd708 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -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