VRFS-2136 only return recordings that have at least 1 claimed recording

This commit is contained in:
Brian Smith 2014-09-11 21:52:26 -04:00
parent c55413d349
commit 4bdcf103ce
2 changed files with 6 additions and 2 deletions

View File

@ -71,7 +71,9 @@ module JamRuby
end
def recent_history
recordings = Recording.where(:band_id => self.id)
recordings = Recording
.joins(:claimed_recordings)
.where(:band_id => self.id)
.order('created_at DESC')
.limit(10)

View File

@ -357,7 +357,9 @@ module JamRuby
end
def recent_history
recordings = Recording.where(:owner_id => self.id)
recordings = Recording
.joins(:claimed_recordings)
.where(:owner_id => self.id)
.order('created_at DESC')
.limit(10)