Commit Graph

28 Commits

Author SHA1 Message Date
Arpit Jalan 198856f78d DEV: annotate models 2020-04-28 15:59:39 +05:30
David Taylor cff6e941de
PERF: Cache ranks for featured badges, to simplify user serialization (#8698) 2020-01-14 14:26:49 +00:00
David Taylor 9348d2cfdf
PERF: Cache user badge count in user_stats table (#8610)
This means that we no longer need to run a `count()` on the user_badges table when serializing a user
2019-12-30 11:19:59 +00:00
Sam Saffron 30990006a9 DEV: enable frozen string literal on all files
This reduces chances of errors where consumers of strings mutate inputs
and reduces memory usage of the app.

Test suite passes now, but there may be some stuff left, so we will run
a few sites on a branch prior to merging
2019-05-13 09:31:32 +08:00
Guo Xiang Tan d07605d885 DEV: Fix failing spec. 2019-04-23 18:25:28 +08:00
Robin Ward 95f263995d FIX: Previous annotations were broken 2019-01-11 14:30:19 -05:00
Robin Ward a3839495e0 Update annotations 2019-01-11 12:19:43 -05:00
Guo Xiang Tan 214dac05de Update annotations. 2018-07-16 14:19:07 +08:00
Guo Xiang Tan ad5082d969 Make rubocop happy again. 2018-06-07 13:28:18 +08:00
Guo Xiang Tan 226ace1643 Update annotations. 2018-02-20 14:28:58 +08:00
Arpit Jalan daeb7694bc update annotations 2017-12-05 21:03:20 +05:30
Guo Xiang Tan 77d4c4d8dc Fix all the errors to get our tests green on Rails 5.1. 2017-09-25 13:48:58 +08:00
Guo Xiang Tan 5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Sam 32c681c96b annotate models 2016-02-23 10:33:53 +11:00
Sigurður Guðbrandsson bee3bbdc05 FIX: the badge triggers broke
Needed to add self. for the badge trigger variables, otherwise it breaks everything ;)
2015-02-26 00:50:58 +00:00
Sigurður Guðbrandsson 15e54c715f FIX: Added two user badge triggers
Created two triggers that trigger events when a badge is granted or removed.

Trigger 1:
user_badge_granted
 Variable - badge_id
 Variable - user_id

Trigger 2:
user_badge_removed
 Variable - badge_id
 Variable - user_id
2015-02-25 17:23:57 +00:00
Sam 22cd259687 FIX: remove faulty "ensure consistency" badge job 2014-08-11 09:21:06 +10:00
Robin Ward 859167470e PERF: Limit the amount of badges fixed in the consistency check. 2014-08-08 15:13:43 -04:00
Sam 45ca83328d Annotate 2014-07-15 11:29:44 +10:00
Sam 9a9ad9bda8 FEATURE: Badge progress
- Refactor model so it stores backfill query
- Implement autobiographer
- Remove sample badge
- Correct featured badges to only include a badge once
2014-07-03 17:29:44 +10:00
Vikhyat Korrapati 83749779cc Add consistency check to revoke duplicate badges. 2014-06-28 01:24:00 +05:30
Vikhyat Korrapati 2e52f795ea Backend changes to support improved badge pages. 2014-06-28 01:24:00 +05:30
Vikhyat Korrapati b3f403952b Move badge grant_count updating to the UserBadge model callbacks. 2014-06-19 16:56:19 +05:30
Vikhyat Korrapati a68b47cb9f Add notification_id column to user_badges. 2014-06-19 16:56:19 +05:30
Vikhyat Korrapati 41ecba1b77 Mark badge notification as read when the notification is clicked. 2014-06-19 16:56:19 +05:30
Vikhyat Korrapati d208e4d517 Multiple grant badges. 2014-05-21 12:54:55 +05:30
Sam 5c148faeb9 annotations were out of date 2014-03-20 15:35:51 +11:00
Vikhyat Korrapati 9b26c8584e Initial badge system implementation. 2014-03-14 21:49:26 +05:30