FEATURE: Allow admins to disable specific badges

This commit is contained in:
Sam
2014-07-14 17:40:01 +10:00
parent 49dbded250
commit 88469721b9
12 changed files with 35 additions and 17 deletions

View File

@ -23,7 +23,7 @@ class User < ActiveRecord::Base
has_many :user_open_ids, dependent: :destroy
has_many :user_actions, dependent: :destroy
has_many :post_actions, dependent: :destroy
has_many :user_badges, dependent: :destroy
has_many :user_badges, -> {where('user_badges.badge_id IN (SELECT id FROM badges where enabled)')}, dependent: :destroy
has_many :badges, through: :user_badges
has_many :email_logs, dependent: :destroy
has_many :post_timings