Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop

This commit is contained in:
Brian Smith 2014-03-03 22:35:48 -05:00
commit e2cae90fa3
3 changed files with 4 additions and 2 deletions

View File

@ -126,4 +126,5 @@ track_download_counts.sql
scores_mod_users2.sql
user_bio.sql
track_changes_counter.sql
scores_better_test_data.sql

View File

@ -51,6 +51,7 @@ module JamRuby
# we will reconnect the same music_session that the connection was previously in,
# if it matches the same value currently in the database for music_session_id
music_session_id_expression = 'NULL'
joined_session_at_expression = 'NULL'
unless reconnect_music_session_id.nil?
music_session_id_expression = "(CASE WHEN music_session_id='#{reconnect_music_session_id}' THEN music_session_id ELSE NULL END)"
joined_session_at_expression = "(CASE WHEN music_session_id='#{reconnect_music_session_id}' THEN NOW() ELSE NULL END)"

View File

@ -206,10 +206,10 @@ class UsersController < ApplicationController
Slide.new("bands", "web/carousel_bands.jpg", "http://www.youtube.com/embed/eaYNM7p6Z5s")
]
@promo_buzz = Promotional.where(:type => 'JamRuby::PromoBuzz', :aasm_state => :active).order(:position)
@promo_buzz = Promotional.where(:type => 'JamRuby::PromoBuzz', :aasm_state => :active).where('latest_id IS NOT NULL').order(:position)
if Rails.application.config.use_promos_on_homepage
@promo_latest = Promotional.where(:type => 'JamRuby::PromoLatest', :aasm_state => :active).order(:position).limit(10)
@promo_latest = Promotional.where(:type => 'JamRuby::PromoLatest', :aasm_state => :active).where('latest_id IS NOT NULL').order(:position).limit(10)
else
@promo_latest, start = Feed.index(nil, limit: 10)
end