Skip to content

Commit

Permalink
Merge pull request #814 from portagenetwork/aaron/issues/813
Browse files Browse the repository at this point in the history
Use "id" Instead of "name" For `default_funder` Org
  • Loading branch information
aaronskiba authored Jul 23, 2024
2 parents 3cf8b9c + 69c150f commit 965b0a6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

### Changed

- Use "id" instead of "name" for `default_funder` Org [#814](https://github.com/portagenetwork/roadmap/pull/814)

- Bump jwt from 2.7.1 to 2.8.2 [#803](https://github.com/portagenetwork/roadmap/pull/803)

- Bump cssbundling-rails from 1.3.3 to 1.4.0 [#796](https://github.com/portagenetwork/roadmap/pull/796)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/template_options_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def index
authorize Template.new, :template_options?

org = org_from_params(params_in: { org_id: org_hash.to_json }) if org_hash.present?
funder = Org.find_by(name: Rails.application.config.default_funder_name)
funder = Org.find(Rails.application.config.default_funder_id)

@templates = []

Expand Down
2 changes: 1 addition & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,6 @@ class Application < Rails::Application
# removed the option for selecting a funder. A funder is needed to show the
# customized templates. For this reason we are specifying in the
# documentation the funder that
config.default_funder_name = Rails.application.secrets.default_funder_name
config.default_funder_id = Rails.application.secrets.default_funder_id.to_i
end
end
12 changes: 6 additions & 6 deletions config/secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ test:
translation_io_api_key: <%= ENV['TRANSLATION_IO_API_KEY'] %>
wicked_pdf_path: <%= ENV['WICKED_PDF_PATH'] %>
wicked_pdf_proxy: <%= ENV['WICKED_PDF_PROXY'] %>
default_funder_name: <%= ENV['DEFAULT_FUNDER_NAME'] %>
default_funder_id: <%= ENV['DEFAULT_FUNDER_ID'] %>
super_admin_password: <%= ENV["SUPER_ADMIN_PASSWORD"] %>
test_password: <%= ENV["TEST_PASSWORD"] %>
user_password: <%= ENV["USER_PASSWORD"] %>
Expand Down Expand Up @@ -61,7 +61,7 @@ development:
translation_io_api_key: <%= ENV['TRANSLATION_IO_API_KEY'] %>
wicked_pdf_path: <%= ENV['WICKED_PDF_PATH'] %>
wicked_pdf_proxy: <%= ENV['WICKED_PDF_PROXY'] %>
default_funder_name: <%= ENV['DEFAULT_FUNDER_NAME'] %>
default_funder_id: <%= ENV['DEFAULT_FUNDER_ID'] %>
super_admin_password: <%= ENV["SUPER_ADMIN_PASSWORD"] %>
test_password: <%= ENV["TEST_PASSWORD"] %>
user_password: <%= ENV["USER_PASSWORD"] %>
Expand Down Expand Up @@ -101,7 +101,7 @@ staging:
translation_io_api_key: <%= ENV['TRANSLATION_IO_API_KEY'] %>
wicked_pdf_path: <%= ENV['WICKED_PDF_PATH'] %>
wicked_pdf_proxy: <%= ENV['WICKED_PDF_PROXY'] %>
default_funder_name: <%= ENV['DEFAULT_FUNDER_NAME'] %>
default_funder_id: <%= ENV['DEFAULT_FUNDER_ID'] %>
super_admin_password: <%= ENV["SUPER_ADMIN_PASSWORD"] %>
test_password: <%= ENV["TEST_PASSWORD"] %>
user_password: <%= ENV["USER_PASSWORD"] %>
Expand Down Expand Up @@ -141,7 +141,7 @@ uat:
translation_io_api_key: <%= ENV['TRANSLATION_IO_API_KEY'] %>
wicked_pdf_path: <%= ENV['WICKED_PDF_PATH'] %>
wicked_pdf_proxy: <%= ENV['WICKED_PDF_PROXY'] %>
default_funder_name: <%= ENV['DEFAULT_FUNDER_NAME'] %>
default_funder_id: <%= ENV['DEFAULT_FUNDER_ID'] %>
super_admin_password: <%= ENV["SUPER_ADMIN_PASSWORD"] %>
test_password: <%= ENV["TEST_PASSWORD"] %>
user_password: <%= ENV["USER_PASSWORD"] %>
Expand Down Expand Up @@ -181,7 +181,7 @@ sandbox:
translation_io_api_key: <%= ENV['TRANSLATION_IO_API_KEY'] %>
wicked_pdf_path: <%= ENV['WICKED_PDF_PATH'] %>
wicked_pdf_proxy: <%= ENV['WICKED_PDF_PROXY'] %>
default_funder_name: <%= ENV['DEFAULT_FUNDER_NAME'] %>
default_funder_id: <%= ENV['DEFAULT_FUNDER_ID'] %>
super_admin_password: <%= ENV["SUPER_ADMIN_PASSWORD"] %>
test_password: <%= ENV["TEST_PASSWORD"] %>
user_password: <%= ENV["USER_PASSWORD"] %>
Expand Down Expand Up @@ -221,7 +221,7 @@ production:
translation_io_api_key: <%= ENV['TRANSLATION_IO_API_KEY'] %>
wicked_pdf_path: <%= ENV['WICKED_PDF_PATH'] %>
wicked_pdf_proxy: <%= ENV['WICKED_PDF_PROXY'] %>
default_funder_name: <%= ENV['DEFAULT_FUNDER_NAME'] %>
default_funder_id: <%= ENV['DEFAULT_FUNDER_ID'] %>
super_admin_password: <%= ENV["SUPER_ADMIN_PASSWORD"] %>
test_password: <%= ENV["TEST_PASSWORD"] %>
user_password: <%= ENV["USER_PASSWORD"] %>
Expand Down

0 comments on commit 965b0a6

Please sign in to comment.