mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-04 07:09:14 +00:00
Autocorrect Style/HashConversion offenses
This commit is contained in:
@@ -40,8 +40,8 @@ module Admin
|
||||
|
||||
respond_to do |format|
|
||||
format.json do
|
||||
collection_attributes = Hash[permitted_params[:column_preferences].
|
||||
each_with_index.map { |cp, i| [i, cp] }]
|
||||
collection_attributes = permitted_params[:column_preferences].
|
||||
each_with_index.to_h { |cp, i| [i, cp] }
|
||||
collection_attributes.select!{ |_i, cp|
|
||||
cp[:action_name] == permitted_params[:action_name]
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ module Admin
|
||||
end
|
||||
|
||||
def load_collection
|
||||
collection_hash = Hash[variant_overrides_params.each_with_index.map { |vo, i| [i, vo] }]
|
||||
collection_hash = variant_overrides_params.each_with_index.to_h { |vo, i| [i, vo] }
|
||||
|
||||
# Reset count_on_hand when switching to producer settings:
|
||||
collection_hash.each_value do |vo|
|
||||
|
||||
Reference in New Issue
Block a user