Skip to content

Commit

Permalink
fix: Allow to configure feat using env var
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentinchampenois committed Nov 8, 2024
1 parent 24f55cf commit 99b1453
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .env-example
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ FRIENDLY_SIGNUP_USE_CONFIRMATION_CODES=1
DECIDIM_SESSION_TIMEOUT=

# SKIP_FIRST_LOGIN_AUTHORIZATION=true
# RAILS_LOG_LEVEL=warn
# RAILS_LOG_LEVEL=warn

# DECIDIM_AWESOME_WEIGHTED_PROPOSAL_VOTING_ENABLED=disabled # or enabled
2 changes: 1 addition & 1 deletion config/initializers/decidim_awesome.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

Decidim::DecidimAwesome.configure do |config|
config.weighted_proposal_voting = :disabled
config.weighted_proposal_voting = Rails.application.secrets.dig(:decidim, :decidim_awesome, :weighted_proposal_voting_enabled)&.to_sym
end
2 changes: 2 additions & 0 deletions config/secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
default: &default
asset_host: <%= ENV["ASSET_HOST"] %>
decidim:
decidim_awesome:
weighted_proposal_voting_enabled: <%= ENV.fetch("DECIDIM_AWESOME_WEIGHTED_PROPOSAL_VOTING_ENABLED", "disabled") %>
currency: <%= ENV["CURRENCY"] || "€" %>
rack_attack:
enabled: <%= ENV["ENABLE_RACK_ATTACK"] %>
Expand Down

0 comments on commit 99b1453

Please sign in to comment.