Mercurial > hg > soundsoftware-site
comparison app/controllers/sys_controller.rb @ 437:102056ec2de9 bug_169
Introduce a method on the sys controller to clear a repository cache; use a file in the mirror dir to notify the Ruby external repo script that it needs to call it
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Mon, 06 Jun 2011 13:31:44 +0100 |
parents | 6c282df74a30 |
children | 5e80956cc792 |
comparison
equal
deleted
inserted
replaced
436:4eb486dbf730 | 437:102056ec2de9 |
---|---|
67 end | 67 end |
68 rescue ActiveRecord::RecordNotFound | 68 rescue ActiveRecord::RecordNotFound |
69 render :nothing => true, :status => 404 | 69 render :nothing => true, :status => 404 |
70 end | 70 end |
71 | 71 |
72 def clear_repository_cache | |
73 project = Project.find(params[:id]) | |
74 if project.repository | |
75 project.repository.clear_cache | |
76 end | |
77 render :nothing => true, :status => 200 | |
78 rescue ActiveRecord::RecordNotFound | |
79 render :nothing => true, :status => 404 | |
80 end | |
81 | |
72 def set_embedded_active | 82 def set_embedded_active |
73 project = Project.find(params[:id]) | 83 project = Project.find(params[:id]) |
74 mods = project.enabled_modules | 84 mods = project.enabled_modules |
75 enable = (params[:enable] == "1") | 85 enable = (params[:enable] == "1") |
76 if mods.detect {|m| m.name == "embedded"} | 86 if mods.detect {|m| m.name == "embedded"} |