summaryrefslogtreecommitdiff
path: root/app/controllers/koding_controller.rb
diff options
context:
space:
mode:
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