finished dmails and favorites functional tests

This commit is contained in:
albert
2010-12-05 22:27:45 -05:00
parent b18f6340e7
commit 46164eab4f
25 changed files with 226 additions and 48 deletions

View File

@@ -13,6 +13,10 @@ class Favorite
# ignore
end
def self.count(user_id)
select_value_sql("SELECT COUNT(*) FROM #{table_name_for(user_id)}").to_i
end
def self.destroy(conditions)
if conditions[:user_id] && conditions[:post_id]
destroy_for_post_and_user(conditions[:post_id], conditions[:user_id])