Mercurial > hg > soundsoftware-site
diff app/controllers/enumerations_controller.rb @ 511:107d36338b70 live
Merge from branch "cannam"
author | Chris Cannam |
---|---|
date | Thu, 14 Jul 2011 10:43:07 +0100 |
parents | cbce1fd3b1b7 |
children | cbb26bc654de |
line wrap: on
line diff
--- a/app/controllers/enumerations_controller.rb Thu Jun 09 16:51:06 2011 +0100 +++ b/app/controllers/enumerations_controller.rb Thu Jul 14 10:43:07 2011 +0100 @@ -75,10 +75,12 @@ # No associated objects @enumeration.destroy redirect_to :action => 'index' + return elsif params[:reassign_to_id] if reassign_to = @enumeration.class.find_by_id(params[:reassign_to_id]) @enumeration.destroy(reassign_to) redirect_to :action => 'index' + return end end @enumerations = @enumeration.class.find(:all) - [@enumeration]