debian-mirror-gitlab/app/controllers/koding_controller.rb

18 lines
355 B
Ruby
Raw Normal View History

2018-12-05 23:21:45 +05:30
# frozen_string_literal: true
2016-09-13 17:45:13 +05:30
class KodingController < ApplicationController
2017-08-17 22:00:37 +05:30
before_action :check_integration!
2016-09-13 17:45:13 +05:30
layout 'koding'
def index
path = File.join(Rails.root, 'doc/user/project/koding.md')
@markdown = File.read(path)
end
private
def check_integration!
2018-03-17 18:26:18 +05:30
render_404 unless Gitlab::CurrentSettings.koding_enabled?
2016-09-13 17:45:13 +05:30
end
end