Skip to content

Commit

Permalink
Merge pull request #5329 from DFE-Digital/add-ostruct-gem
Browse files Browse the repository at this point in the history
Add ostruct gem
  • Loading branch information
cwrw authored Nov 25, 2024
2 parents d7c4ef7 + 66bd30e commit 87bad22
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ gem "net-pop", require: false
gem "net-smtp", require: false

gem "json-diff", "~> 0.4.1", require: false
gem "ostruct"

gem "cssbundling-rails", "~> 1.4"
gem "jsbundling-rails"
Expand Down
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,7 @@ DEPENDENCIES
net-smtp
nokogiri
openapi3_parser (~> 0.9.2)
ostruct
pagy (~> 9)
paper_trail
parallel_tests
Expand Down
4 changes: 2 additions & 2 deletions app/forms/finance/choose_payment_breakdown_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ class ChoosePaymentBreakdownForm
validates :provider, presence: { message: I18n.t("errors.provider.blank") }, on: :choose_provider

def programme_choices
choices = [::OpenStruct.new(id: "ecf", name: "ECF payments")]
choices = [OpenStruct.new(id: "ecf", name: "ECF payments")]

unless FeatureFlag.active?(:disable_npq)
choices << ::OpenStruct.new(id: "npq", name: "NPQ payments")
choices << OpenStruct.new(id: "npq", name: "NPQ payments")
end

choices
Expand Down

0 comments on commit 87bad22

Please sign in to comment.