mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-30 21:27:17 +00:00
Add a comment around the use of safe_constantize
It triggers a Brakeman error that can be safely ignored
This commit is contained in:
@@ -9,6 +9,8 @@ module Admin
|
||||
end
|
||||
|
||||
def create
|
||||
# The use of "safe_constantize" here will trigger a Brakeman error, it can safely be ignored
|
||||
# as it's a false positive : https://github.com/openfoodfoundation/openfoodnetwork/pull/10821
|
||||
voucher_type = params[:vouchers_flat_rate][:voucher_type]
|
||||
if Voucher::TYPES.include?(voucher_type)
|
||||
@voucher = voucher_type.safe_constantize.create(
|
||||
|
||||
Reference in New Issue
Block a user