summaryrefslogtreecommitdiff
path: root/app/controllers/koding_controller.rb
diff options
context:
space:
mode:
authorRégis Freyd (GitLab) <regis@gitlab.com>2016-09-06 14:06:16 +0000
committerRégis Freyd (GitLab) <regis@gitlab.com>2016-09-06 14:06:16 +0000
commitb44636c259e7a655a60cc2b98431d6d00a73e002 (patch)
tree93545ea821319c23410a444f676c8e5a66daeecf /app/controllers/koding_controller.rb
parent310beb9002f1bbdd07abe5bba6712769773a99b2 (diff)
parente9e8c67fb7d58288dbac1777b63ea7d3128d6268 (diff)
downloadgitlab-ce-email-in-slash-commands.tar.gz
Merge branch 'master' into 'email-in-slash-commands'email-in-slash-commands
# Conflicts: # doc/user/project/slash_commands.md # doc/workflow/README.md
Diffstat (limited to 'app/controllers/koding_controller.rb')
-rw-r--r--app/controllers/koding_controller.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/controllers/koding_controller.rb b/app/controllers/koding_controller.rb
new file mode 100644
index 00000000000..f3759b4c0ea
--- /dev/null
+++ b/app/controllers/koding_controller.rb
@@ -0,0 +1,15 @@
+class KodingController < ApplicationController
+ before_action :check_integration!, :authenticate_user!, :reject_blocked!
+ layout 'koding'
+
+ def index
+ path = File.join(Rails.root, 'doc/user/project/koding.md')
+ @markdown = File.read(path)
+ end
+
+ private
+
+ def check_integration!
+ render_404 unless current_application_settings.koding_enabled?
+ end
+end