Class: CodeVersion::CodeVersionsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/code_version/code_versions_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



3
4
5
6
7
8
9
10
11
12
13
14
# File 'app/controllers/code_version/code_versions_controller.rb', line 3

def show
	file_path = "#{Rails.root}/REVISION"
	info = {}
	if File.exists? file_path
 	File.open(file_path).each_line do |line|
 		info["Git Commit Number"] = line
 	end
 else
 	info = {"Error" => "No file REVISION in Rails root directory"}
 end
	render :json => info
end