summaryrefslogtreecommitdiff
path: root/app/controllers/notes_controller.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-08-10 06:42:31 -0700
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-08-10 06:42:31 -0700
commit5fd0e7ba119d59a3e9f2ea3eed03ece1e8baeec3 (patch)
tree2df982fb426d38e61589e66eb958138a105a0a19 /app/controllers/notes_controller.rb
parent35b45da63e683e29318afac2e41ec8b3ac8419ab (diff)
parent9639780359f16d784f22af2a1dbbcd8322ffd6c3 (diff)
downloadgitlab-ce-5fd0e7ba119d59a3e9f2ea3eed03ece1e8baeec3.tar.gz
Merge pull request #1198 from NARKOZ/preview_notes
ability to preview notes
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