From 26f751cdc44ccf98b359148cd5d0b769aeab5fad Mon Sep 17 00:00:00 2001 From: Seth Call Date: Sat, 11 Jan 2014 05:34:26 +0000 Subject: [PATCH] * sending 'downloadavailable' messages when mix becomes available --- ruby/lib/jam_ruby/models/mix.rb | 6 +++++- web/config/environment.rb | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ruby/lib/jam_ruby/models/mix.rb b/ruby/lib/jam_ruby/models/mix.rb index 27cd44e7e..8ab73473d 100644 --- a/ruby/lib/jam_ruby/models/mix.rb +++ b/ruby/lib/jam_ruby/models/mix.rb @@ -37,7 +37,11 @@ module JamRuby self.length = length self.md5 = md5 self.completed = true - save + if save + recording.users.each do |user| + Notification.send_download_available(user.id) + end + end end def s3_url diff --git a/web/config/environment.rb b/web/config/environment.rb index 5f59817ee..061a53982 100644 --- a/web/config/environment.rb +++ b/web/config/environment.rb @@ -5,7 +5,5 @@ Mime::Type.register "audio/ogg", :audio_ogg APP_CONFIG = Rails.application.config -puts APP_CONFIG.audiomixer_path - # Initialize the rails application SampleApp::Application.initialize!