Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Convert rails 3 list of routes to rails 6 list of routes

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 250
    Answer it

    Having trouble defining multiple routes together in rails 6.

    In rails 3 we defined multiple routes like the example below.

    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
      }
    

    For rails 6 I think the body should be something similar to what i have below, but I'm not sure what the exact syntax is.

    member_routes = {
            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';
        } 
    

 0 Answer(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: