mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Add missing strong params to less important controllers not tested in specs
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
module Spree
|
||||
module Admin
|
||||
class CountriesController < ResourceController
|
||||
def permitted_resource_params
|
||||
params.require(:country).
|
||||
permit(:name, :iso_name, :states_required)
|
||||
end
|
||||
|
||||
def collection
|
||||
super.order(:name)
|
||||
end
|
||||
|
||||
@@ -19,6 +19,11 @@ module Spree
|
||||
@return_authorization.add_variant(variant_id.to_i, qty.to_i)
|
||||
end
|
||||
end
|
||||
|
||||
def permitted_resource_params
|
||||
params.require(:return_authorization).
|
||||
permit(:amount, :reason, :stock_location_id)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
module Spree
|
||||
module Admin
|
||||
class ShippingCategoriesController < ResourceController
|
||||
def permitted_resource_params
|
||||
params.require(:shipping_category).
|
||||
permit(:name, :temperature_controlled)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user