mercredi 5 janvier 2022

Convert rails 3 list of routes to rails 6 list of routes

Having trouble converting my list of routes in rails 3 to a list of routes in rails 6.

This is an example of my list.

member_routes = {
    :validate_update_action                => :put,
    :rebuild_update_form                   => :put,
    :create_change_request                 => :post,
    :validate_create_change_request_action => :post,
    :destroy                               => :get,
    :apply_to_beta                         => :put,
    :update_history                        => :get
  }

I think the body should be something similar to what i have below but not sure what the exact syntax is.

{
    put 'validate_update_action';
    put 'rebuild_update_form';
    post 'create_change_request';
    post 'validate_create_change_request_action';
    get 'destroy';
    put 'apply_to_beta';
    get 'update_history';
} 

Aucun commentaire:

Enregistrer un commentaire