Add ability to toggle badges by organization#4249
Merged
Conversation
oriolgual
reviewed
Oct 8, 2018
|
|
||
| class AddBadgeSwitchToOrganizations < ActiveRecord::Migration[5.2] | ||
| def change | ||
| add_column :decidim_organizations, :badges_enabled, :boolean, null: false, default: false |
Contributor
Author
There was a problem hiding this comment.
I don't like true as a default for a boolean value in general, as it might be prone to errors as setting that value is not explicit. Which makes me think I forgot to set that value on organization creation!
Contributor
There was a problem hiding this comment.
I'm not sure about this, to me it's kind of weird to have this as default false since by default we want it to be true.
Contributor
There was a problem hiding this comment.
You can be explicit about it even if it's true at the database level.
mrcasals
reviewed
Oct 9, 2018
Contributor
mrcasals
left a comment
There was a problem hiding this comment.
Nice job! Can you modify the decidim-core seeds so the default organization has the gamification system active, please? 😄
Contributor
Author
|
Nice catch @mrcasals! Done! |
mrcasals
previously approved these changes
Oct 9, 2018
oriolgual
previously approved these changes
Oct 9, 2018
b0e2112 to
317d67d
Compare
mrcasals
approved these changes
Oct 9, 2018
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎩 What? Why?
This allows each organization to toggle the whole badges system on or off depending on their specific needs.
The idea is that the badges subsystem is essentially working all the time, but notifications won't be triggered and the interface won't show up - the idea is that you can activate badges at any moment and scores will be right.
📌 Related Issues
📋 Subtasks
CHANGELOGentry📷 Screenshots (optional)
None