Mercurial > hg > soundsoftware-site
diff app/controllers/sys_controller.rb @ 310:b9c2ba9e49b4 live
Merge from branch "feature_73"
author | Chris Cannam |
---|---|
date | Mon, 28 Mar 2011 17:50:25 +0100 |
parents | 6c282df74a30 |
children | 102056ec2de9 |
line wrap: on
line diff
--- a/app/controllers/sys_controller.rb Wed Mar 23 11:33:36 2011 +0000 +++ b/app/controllers/sys_controller.rb Mon Mar 28 17:50:25 2011 +0100 @@ -55,6 +55,20 @@ render :nothing => true, :status => 404 end + def get_external_repo_url + project = Project.find(params[:id]) + if project.repository + repo = project.repository + if repo.is_external? + render :text => repo.external_url, :status => 200 + else + render :nothing => true, :status => 200 + end + end + rescue ActiveRecord::RecordNotFound + render :nothing => true, :status => 404 + end + def set_embedded_active project = Project.find(params[:id]) mods = project.enabled_modules