Skip to content

Commit

Permalink
also delete git repo file when db entry is destroyed
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank committed Jul 30, 2010
1 parent a14ff2a commit b451cb9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/repositories_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def edit
end
if request.post? && @repository
@repository.attributes = params[:repository]
@repository.url = "#{RAILS_ROOT}/git_repositories/#{@repository.project.identifier}.git"
@repository.save
end
render(:update) do |page|
Expand Down Expand Up @@ -70,6 +71,7 @@ def committers

def destroy
@repository.destroy
FileUtils.rm_rf(@repository.url)
redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'repository'
end

Expand Down

0 comments on commit b451cb9

Please sign in to comment.