Class: GitchangelogController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/gitchangelog_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'app/controllers/gitchangelog_controller.rb', line 5

def index

	begin
		git = Git.open (Rails.root)
		@log = git.log
		@logsize = @log.count
	rescue Git::GitExecuteError
		@log = []
		@logsize = 0
		@giterror = true
	end
	
	respond_to do |format|
     format.html # index.html.erb
   end
end