Skip to content

Commit

Permalink
Move overrides to /app folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Kagemaru committed Sep 26, 2023
1 parent bdd6869 commit 418c5f5
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 10 deletions.
13 changes: 7 additions & 6 deletions config/i18n-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,13 @@ search:
# - app/

## Root directories for relative keys resolution.
# relative_roots:
# - app/controllers
# - app/helpers
# - app/mailers
# - app/presenters
# - app/views
relative_roots:
- app/controllers
- app/helpers
- app/mailers
- app/presenters
- app/views
- app/overrides

## Files or `File.fnmatch` patterns to exclude from search. Some files are always excluded regardless of this setting:
## %w(*.jpg *.png *.gif *.svg *.ico *.eot *.otf *.ttf *.woff *.woff2 *.pdf *.css *.sass *.scss *.less *.yml *.json)
Expand Down
8 changes: 4 additions & 4 deletions config/initializers/decidim_zuerich_customization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
[Decidim::System::UpdateOrganization, DecidimZuerich::System::UpdateOrganization]
].each { |base, addition| base.prepend addition }

override_path = Pathname.new('lib/overrides')
override_path = Pathname.new('app/overrides')
Rails.autoloaders.main.ignore(override_path)

overrides = override_path.glob('**/*_override.rb')
Rails.application.config.after_initialize do
overrides.each do |override|
require_dependency override.expand_path.to_s
load override.expand_path.to_s
end
end

Expand All @@ -56,8 +56,8 @@
# request is processed. This is done through a notification to
# get access to the `current_*` environment variables within
# Decidim. Taken and adapted from the term_customizer module.
ActiveSupport::Notifications.subscribe "start_processing.action_controller" do |_name, _started, _finished, _unique_id, data|
DecidimZuerich::Verifications::Sms::AspsmsGateway.organization = data[:headers].env["decidim.current_organization"]
ActiveSupport::Notifications.subscribe 'start_processing.action_controller' do |_name, _started, _finished, _unique_id, data|
DecidimZuerich::Verifications::Sms::AspsmsGateway.organization = data[:headers].env['decidim.current_organization']
end

# Override default for surveys
Expand Down

0 comments on commit 418c5f5

Please sign in to comment.