@@ -76,12 +76,12 class EnumerationsController < ApplicationController | |||||
76 | @enumeration.destroy |
|
76 | @enumeration.destroy | |
77 | redirect_to :action => 'index' |
|
77 | redirect_to :action => 'index' | |
78 | elsif params[:reassign_to_id] |
|
78 | elsif params[:reassign_to_id] | |
79 |
if reassign_to = |
|
79 | if reassign_to = @enumeration.class.find_by_id(params[:reassign_to_id]) | |
80 | @enumeration.destroy(reassign_to) |
|
80 | @enumeration.destroy(reassign_to) | |
81 | redirect_to :action => 'index' |
|
81 | redirect_to :action => 'index' | |
82 | end |
|
82 | end | |
83 | end |
|
83 | end | |
84 | @enumerations = Enumeration.find(:all, :conditions => ['type = (?)', @enumeration.type]) - [@enumeration] |
|
84 | @enumerations = @enumeration.class.find(:all) - [@enumeration] | |
85 | #rescue |
|
85 | #rescue | |
86 | # flash[:error] = 'Unable to delete enumeration' |
|
86 | # flash[:error] = 'Unable to delete enumeration' | |
87 | # redirect_to :action => 'index' |
|
87 | # redirect_to :action => 'index' |
General Comments 0
You need to be logged in to leave comments.
Login now