Model.destroy(array of ids) Bug

Hello friends !

Model.destroy(array of ids) gives record not found error in Internet Explorer.

Sandip R~


Are you certain all of the ids are valid?

You could try adding something like this to your controller action
before the destroy is called:

def destroy
  @records = Model.all( :conditions => ["id IN (?)", array])
  raise "Not all ids were valid!" unless @records.size == array.size

This will raise an error if the ids are not all valid and you'll know
to look elsewhere for the root of the problem

Hope that helps?


Sorry, my mistake !

Actually IE brawser was submitting request twice to delete action.
hence…in second request it was showing record not found exception.

–Sandip R~