Module: Spree::Api::V3::ParamsNormalizer
- Extended by:
- ActiveSupport::Concern
- Included in:
- ResourceController
- Defined in:
- app/controllers/concerns/spree/api/v3/params_normalizer.rb
Overview
Normalizes flat API v3 JSON params for Rails model consumption:
-
Prefixed ID resolution — decodes Stripe-style prefixed IDs (e.g. "prod_86Rf07xd4z") to integer primary keys for any param ending in
_idor_ids. -
Nested attributes normalization — converts flat arrays (e.g.
taxon_rules: [...]) to Rails_attributesformat (e.g.taxon_rules_attributes: [...]) based on the model'saccepts_nested_attributes_fordeclarations.
Uses prepend so it always wraps permitted_params regardless of which
controller in the hierarchy defines it — no manual calls needed.