Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9259045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:33:41+00:00 2026-06-18T12:33:41+00:00

The CRUD principle defines the four basic operations on persistent data: Create, Read, Update,

  • 0

The CRUD principle defines the four basic operations on persistent data:

  • Create,
  • Read,
  • Update,
  • Delete.

HTTP verbs also use the DELETE word.

Why does the default routing in Rails use the word “destroy” for the action corresponding to the HTTP verb DELETE?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T12:33:42+00:00Added an answer on June 18, 2026 at 12:33 pm

    Rails uses 4 standard methods(verbs), namely:

    • GET
    • POST
    • PUT
    • DELETE

    Besides it has 7 RESTful actions:

    • index
    • new
    • create
    • edit
    • update
    • show
    • destroy

    Rails never uses the same verb as the corresponding action. Routing to the action destroy makes it possible to do more than a single DELETE, through the corresponding action in the controller.

    This railsguide might be of interest to you:
    http://guides.rubyonrails.org/routing.html

    Explanation

    Browsers request pages from Rails by making a request for a URL using a specific HTTP method, such as GET, POST, PUT and DELETE. Each method is a request to perform an operation on the resource. A resource route maps a number of related requests to actions in a single controller.

    Now, imagine we have a HTTP GET request, which means you want to read/retrieve data. If the action would have the same name as the verb, GET in this case, it would be overly simplistic. GET can give access to show, index, new or edit actions. They all read data, but the actions themselves are definitely not the same. The same could be said about the DELETE request. This request is processed through the controller and can have different implementations within actions. It might be you want to destroy a post, but it might as well mean you want to log out of your user session. Only having an action called delete would not justify the possibilities related to it, through the controller.

    Edit

    If you want to know more about how requests from the browser are processed, you could read some information about the M(odel)V(iew)C(ontroller)-model that Rails uses:

    http://www.youtube.com/watch?v=3mQjtk2YDkM&noredirect=1

    and:

    http://betterexplained.com/articles/intermediate-rails-understanding-models-views-and-controllers/

    A quote from this link:

    The browser makes a request, such as http://mysite.com/video/show/15
    The web server (mongrel, WEBrick, etc.) receives the request. It uses routes to find out which controller to use: the default route pattern is “/controller/action/id” as defined in config/routes.rb.

    Meaning your initial request will be translated and processed through the webserver and the correct route has to be defined through the controller, where the restful action, such as destroy, is located.

    In the early days of Rails, there were only 2 verb’s, namely GET and POST (since PUT and DELETE are not supported, which later versions of rails resolved by adding PUT and DELETE through hidden variables. The name of the destroy action never changed, since request and actions are two different things.

    Actions || show  || create || update || destroy
    SQL     || select|| create || update || delete
    REST    || get   || post   || post   || post
    
    Actions || show  || create || update || destroy
    SQL     || select|| create || update || delete
    REST    || get   || post   || put    || delete
    

    This quote may be of further interest:

    “Because the router uses the HTTP verb and URL to match inbound requests, four URLs map to seven different actions.”

    http://guides.rubyonrails.org/routing.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have YoutubeVideoService class which does CRUD(Create, Read, Update, and Delete) operations. In my
I am writing simple CRUD(Create, Remove ,Update ,Delete) application using Spring MVC and hibernate.
I have a basic CRUD application in ASP.Net MVC 4. The Create view of
I have a basic CRUD form that uses PageMethods to update the user details,
I have a basic CRUD web app where people can create articles/edit them. I
Symfony crud generator by default create two forms, for create and update. I want
I am doing CRUD using spring jdbc template. insert,select and delete operations are working
When it comes to CRUD operations and your database (SQL Server '08), is it
I have a CRUD page which shows data from a query (a List of
I have a simple CRUD app with some basic validations for a Commodity model.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.