vrfs-916: added favorite_count method

This commit is contained in:
Jonathan Kolyer 2013-12-18 22:10:55 -06:00
parent f7c08ce472
commit 4b3b8491b3
1 changed files with 4 additions and 0 deletions

View File

@ -622,6 +622,10 @@ module JamRuby
favorite.save
end
def favorite_count
0 # FIXME: update this with recording likes count when implemented
end
def self.delete_favorite(user_id, recording_id)
JamRuby::UserFavorite.delete_all "(user_id = '#{user_id}' AND recording_id = '#{recording_id}')"
end