From 9639780359f16d784f22af2a1dbbcd8322ffd6c3 Mon Sep 17 00:00:00 2001 From: Nihad Abbasov Date: Wed, 8 Aug 2012 02:25:24 -0700 Subject: render notes preview on server-side --- app/controllers/notes_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/controllers/notes_controller.rb') diff --git a/app/controllers/notes_controller.rb b/app/controllers/notes_controller.rb index e8e4bb544a8..8fac6428a58 100644 --- a/app/controllers/notes_controller.rb +++ b/app/controllers/notes_controller.rb @@ -33,7 +33,11 @@ class NotesController < ApplicationController end end - protected + def preview + render :text => view_context.markdown(params[:note]) + end + + protected def notes @notes = Notes::LoadContext.new(project, current_user, params).execute -- cgit v1.2.1