app/controllers/api/v1/line_referentials_controller.rb
# Accepts
# * normal attributes
# * hash attributes for single resources
# * array of hash with id parameter for several resources
#
# [ "type", "stop_place", "stop_places", "quay", "quays",
#   {"stop_place"=>{}, "stop_places"=>[:id], "quay"=>{}, "quays"=>[:id]}]
Accepts
normal attributes
hash attributes for single resources
array of hash with id parameter for several resources


Accepts normal attributes hash attributes for single resources array of hash with id parameter for several resources
def permitted_attributes
    @permitted_attributes ||= [
      "type",
      *WebhookEvent::LineReferential.resource_names,
      Hash[WebhookEvent::LineReferential.resource_names.map { |name| [name, name.end_with?('s') ? [:id] : {} ] }]
    ]
  end
def permitted_attributes @permitted_attributes ||= [ "type" , * WebhookEvent :: LineReferential . resource_names , Hash [ WebhookEvent :: LineReferential . resource_names . map { | name | [ name , name . end_with? ( 's' ) ? [ :id ] : { } ] } ] ] end
Accepts
 normal attributes
 hash attributes for single resources
 array of hash with id parameter for several resources
Accepts normal attributes hash attributes for single resources array of hash with id parameter for several resources