]> source.dussan.org Git - redmine.git/commitdiff
Merged r3524 from trunk.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 11 Apr 2010 14:29:59 +0000 (14:29 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 11 Apr 2010 14:29:59 +0000 (14:29 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3645 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/enumerations_controller.rb

index d39f5edf77c26f9840485d99f9c4c703f3bb6cc1..e5b50c87332afaf4d522281c085c99fb9e25eae4 100644 (file)
@@ -76,12 +76,12 @@ class EnumerationsController < ApplicationController
       @enumeration.destroy
       redirect_to :action => 'index'
     elsif params[:reassign_to_id]
-      if reassign_to = Enumeration.find_by_type_and_id(@enumeration.type, params[:reassign_to_id])
+      if reassign_to = @enumeration.class.find_by_id(params[:reassign_to_id])
         @enumeration.destroy(reassign_to)
         redirect_to :action => 'index'
       end
     end
-    @enumerations = Enumeration.find(:all, :conditions => ['type = (?)', @enumeration.type]) - [@enumeration]
+    @enumerations = @enumeration.class.find(:all) - [@enumeration]
   #rescue
   #  flash[:error] = 'Unable to delete enumeration'
   #  redirect_to :action => 'index'