Browse Source

Fix immediate_change parameter type casting in organisation name change params

pull/3053/head
Manny Dinssa 2 weeks ago
parent
commit
acc677b9d3
  1. 4
      app/controllers/organisation_name_changes_controller.rb

4
app/controllers/organisation_name_changes_controller.rb

@ -30,6 +30,8 @@ private
end
def organisation_name_change_params
params.require(:organisation_name_change).permit(:name, :startdate, :immediate_change)
params.require(:organisation_name_change).permit(:name, :startdate, :immediate_change).tap do |whitelisted|
whitelisted[:immediate_change] = ActiveModel::Type::Boolean.new.cast(whitelisted[:immediate_change])
end
end
end

Loading…
Cancel
Save