summaryrefslogtreecommitdiff
path: root/app/controllers/notes_controller.rb
diff options
context:
space:
mode:
authorNihad Abbasov <narkoz.2008@gmail.com>2012-08-08 02:25:24 -0700
committerNihad Abbasov <narkoz.2008@gmail.com>2012-08-09 23:47:48 -0700
commit9639780359f16d784f22af2a1dbbcd8322ffd6c3 (patch)
treef8c56161b0d6561568f088df9961362eb1ece88b /app/controllers/notes_controller.rb
parent1ec3bd3f8d237c1afb73d4ad1b7a0c24f9a6887c (diff)
downloadgitlab-ce-9639780359f16d784f22af2a1dbbcd8322ffd6c3.tar.gz
render notes preview on server-side
Diffstat (limited to 'app/controllers/notes_controller.rb')
-rw-r--r--app/controllers/notes_controller.rb6
1 files changed, 5 insertions, 1 deletions
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