How to identify the path that is easy to make a mistake

How to identify the path

When searching for a path name, I usually use rails routes at the terminal,

               Prefix Verb   URI Pattern                                                                              Controller#Action
    new_admin_session GET    /admins/sign_in(.:format)                                                                admins/sessions#new
        admin_session POST   /admins/sign_in(.:format)                                                                admins/sessions#create
destroy_admin_session DELETE /admins/sign_out(.:format)                                                               admins/sessions#destroy

Find the path name from the prefix.

no path name

However, there are cases where the path name is not written like this.

               Prefix Verb   URI Pattern                                                                              
         edit_product GET    /products/:id/edit(.:format)                                                             products#edit
              product GET    /products/:id(.:format)                                                                  products#show
                      PATCH  /products/:id(.:format)                                                                  products#update
                      PUT    /products/:id(.:format)                                                                  products#update
                      DELETE /products/:id(.:format)                                                                  products#destroy
                 cart GET    /carts/:id(.:format)                                                                     carts#show

The path name for products # destroy and products # update cannot be found. In this case, the path name will be product_path. You can go up until the path name appears in the prefix.

Recommended Posts

How to identify the path that is easy to make a mistake
How to make a mod for Slay the Spire
How to make a Java container
How to make a JDBC driver
How to make a splash screen
How to make a Jenkins plugin
How to make a Maven project
How to make a Java array
Let's write a code that is easy to maintain (Part 2) Name
How to make a Java calendar Summary
How to make a Discord bot (Java)
How to interact with a server that does not crash the app
JVM Performance Tuning: What is Tuning and How to Make a Good Plan
Write code that is easy to maintain (Part 1)
Make a margin to the left of the TextField
Write code that is easy to maintain (Part 4)
Write code that is easy to maintain (Part 3)
Find a value that is convenient to have a method and make it a ValueObject
How to make a unique combination of data in the rails intermediate table
I tried to make a program that searches for the target class from the process that is overloaded with Java
How to run the SpringBoot app as a service
How far is the correct answer to divide the process?
How to make a Vagrant Plugin that you learned when you forked and published vagrant-mutagen
[Java] How to extract the file name from the path
How to make JavaScript work on a specific page
MockMVC returns 200 even if I make a request to a path that does not exist
How to make shaded-jar
How to specify the resource path in HTML import
How to make a cache without thinking too much
How to identify the cause when GC occurs frequently and CPU usage is high
How to perform a specific process when the back button is pressed in Android Fragment
A memo of the program that allows you to realize that the probability of dice rolling is about 1/6
[Rails Tutorial Chapter 2] What to do when you make a mistake in the column name
[Java] I tried to make a rock-paper-scissors game that beginners can run on the console.
[Docker] Is it good enough to call it a multi-stage build? → The story that became so good
How to take a screenshot with the Android Studio emulator
SDWebImage: How to clear the cache for a particular UIImageView
How to create a form to select a date from the calendar
How to create a placeholder part to use in the IN clause
Learning Ruby with AtCoder 13 How to make a two-dimensional array
How to add the same Indexes in a nested array
What is an immutable object? [Explanation of how to make]
[jsoup] How to get the full amount of a document
[Rails] How to temporarily save the request URL of a user who is not logged in and return to that URL after logging in
Java --How to make JTable
How to leave a comment
[Rails] How to make seed
How to insert a video
How to create a method
How to make an application with ruby on rails (assuming that the environment has been built)
How to solve the problem that the website image is not displayed after deploying to heroku on Rails 5
How to make a key pair of ecdsa in a format that can be read by Java
I made a GitHub Action that makes it easy to understand the execution result of RSpec
How to deal with the type that I thought about writing a Java program for 2 years
A guide to "Something is slowing down ..." at the TCP layer
Mechanism for converting to a language that the browser can recognize
How to create a jar file or war file using the jar command
How to fix the problem that Aptana Studio does not start
How to make a hinadan for a Spring Boot project using SPRING INITIALIZR
How to make a jar file with no dependencies in Maven
How to implement a job that uses Java API in JobScheduler