Commit 68ce318d1c3b86d38137cc592e541a8711728e05

Authored by Victor Costa
1 parent cb82846f

Improve pending badges scope

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
lib/gamification_plugin/badge.rb
... ... @@ -18,6 +18,6 @@ class GamificationPlugin::Badge < Noosfero::Plugin::ActiveRecord
18 18 Merit::BadgesSash.where(:badge_id => self.id).destroy_all
19 19 end
20 20  
21   - scope :notification_pending, :include => :badges_sash, :conditions => ['badges_sashes.notified_user = false']
  21 + scope :notification_pending, :include => :badges_sash, :conditions => {:badges_sashes => {:notified_user => false}}
22 22  
23 23 end
... ...