X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/2b326acc32d5d89119038b21f390eccf8029c305..344c5534ee328243ce8f5787e0ef6c3dcbf87b15:/app/controllers/site_controller.rb?ds=sidebyside diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index f0c686c9f..fa33deeee 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -1,5 +1,6 @@ class SiteController < ApplicationController layout 'site', :except => [:key, :permalink] + layout false, :only => [:key, :permalink] before_filter :authorize_web before_filter :set_locale @@ -84,4 +85,8 @@ class SiteController < ApplicationController def copyright @locale = params[:copyright_locale] || I18n.locale end + + def preview + render :text => RichText.new(params[:format], params[:text]).to_html + end end