From f388f1c7e261902bb62192e96e33d942bbfcc4dc Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Wed, 19 Feb 2014 20:06:40 -0500 Subject: [PATCH] add likes and play count back to model...not sure how it got deleted --- ruby/lib/jam_ruby/models/recording.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ruby/lib/jam_ruby/models/recording.rb b/ruby/lib/jam_ruby/models/recording.rb index 8fc666e0f..7e8ea3ac9 100644 --- a/ruby/lib/jam_ruby/models/recording.rb +++ b/ruby/lib/jam_ruby/models/recording.rb @@ -40,6 +40,14 @@ module JamRuby self.band_id = nil if self.band_id == '' end + def like_count + self.likes.size + end + + def play_count + self.plays.size + end + def comment_count self.comments.size end