fixed upload->post converion process

This commit is contained in:
albert
2010-03-17 19:20:44 -04:00
parent ca8be10ab9
commit dcf8d0df4c
20 changed files with 346 additions and 100 deletions

View File

@@ -12,7 +12,9 @@ class Favorite
end
def self.destroy_all_for_post(post)
ActiveRecord::Base.connection.execute("DELETE FROM #{table_name_for(user)} WHERE post_id = #{post.id}")
0.upto(9) do |i|
ActiveRecord::Base.connection.execute("DELETE FROM favorites_#{i} WHERE post_id = #{post.id}")
end
end
def self.destroy_all_for_user(user)