cope with tag filters being on deleted tags

This commit is contained in:
joshua stein 2012-09-06 12:07:35 -05:00
parent 6be5150bb0
commit 61f45092f8

View file

@ -16,7 +16,7 @@ class FiltersController < ApplicationController
end
@user.tag_filters(:include => :tag).each do |tf|
if new_filters.include?(tf.tag.tag)
if tf.tag && new_filters.include?(tf.tag.tag)
new_filters.reject!{|t| t == tf.tag.tag }
else
tf.destroy