Mercurial > hg > soundsoftware-site
comparison app/controllers/enumerations_controller.rb @ 441:cbce1fd3b1b7 redmine-1.2
Update to Redmine 1.2-stable branch (Redmine SVN rev 6000)
author | Chris Cannam |
---|---|
date | Mon, 06 Jun 2011 14:24:13 +0100 |
parents | 513646585e45 |
children | cbb26bc654de |
comparison
equal
deleted
inserted
replaced
245:051f544170fe | 441:cbce1fd3b1b7 |
---|---|
73 @enumeration = Enumeration.find(params[:id]) | 73 @enumeration = Enumeration.find(params[:id]) |
74 if !@enumeration.in_use? | 74 if !@enumeration.in_use? |
75 # No associated objects | 75 # No associated objects |
76 @enumeration.destroy | 76 @enumeration.destroy |
77 redirect_to :action => 'index' | 77 redirect_to :action => 'index' |
78 return | |
78 elsif params[:reassign_to_id] | 79 elsif params[:reassign_to_id] |
79 if reassign_to = @enumeration.class.find_by_id(params[:reassign_to_id]) | 80 if reassign_to = @enumeration.class.find_by_id(params[:reassign_to_id]) |
80 @enumeration.destroy(reassign_to) | 81 @enumeration.destroy(reassign_to) |
81 redirect_to :action => 'index' | 82 redirect_to :action => 'index' |
83 return | |
82 end | 84 end |
83 end | 85 end |
84 @enumerations = @enumeration.class.find(:all) - [@enumeration] | 86 @enumerations = @enumeration.class.find(:all) - [@enumeration] |
85 #rescue | 87 #rescue |
86 # flash[:error] = 'Unable to delete enumeration' | 88 # flash[:error] = 'Unable to delete enumeration' |