Es ist der folgende Code für das Routing: ohne ‚Vorgaben‘ Hash auf jeder ZeileWie wird das Standardformat für das Routing in Rails festgelegt?
resources :orders, only: [:create], defaults: { format: 'json' }
resources :users, only: [:create, :update], defaults: { format: 'json' }
resources :delivery_types, only: [:index], defaults: { format: 'json' }
resources :time_corrections, only: [:index], defaults: { format: 'json' }
Es ist möglich, Standardformat für alle Ressourcen unter Verwendung von 1-String zu setzen? Vielen Dank.
Ist nicht das Routing von verschiedenen Anforderungstypen aus der Header-Anfrage abgeleitet (http: // stackoverflow.com/questions/1595424/request-format-returning/1595453#1595453), nicht in einem param? –