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 7587607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:42:56+00:00 2026-05-30T19:42:56+00:00

I have simple delete link: = link_to Delete, messages_path(message.id), :method => :delete Gives me

  • 0

I have simple delete link:

= link_to "Delete", messages_path(message.id), :method => :delete

Gives me error: No route matches [DELETE] "/messages.316"

How to fix this?

I have ruby 1.9.3p0 Rails 3.1.1

My routes.rb

  resources :messages do
    collection do
      get :outbox
    end
  end

when i change this to message_path i recieve wrong number of arguments (0 for 1) -> full_trace: https://gist.github.com/1967988
-> all files: https://gist.github.com/1967994

   outbox_messages GET    /messages/outbox(.:format)          {:action=>"outbox", :controller=>"messages"}
           messages GET    /messages(.:format)                 {:action=>"index", :controller=>"messages"}
                    POST   /messages(.:format)                 {:action=>"create", :controller=>"messages"}
        new_message GET    /messages/new(.:format)             {:action=>"new", :controller=>"messages"}
       edit_message GET    /messages/:id/edit(.:format)        {:action=>"edit", :controller=>"messages"}
            message GET    /messages/:id(.:format)             {:action=>"show", :controller=>"messages"}
                    PUT    /messages/:id(.:format)             {:action=>"update", :controller=>"messages"}
                    DELETE /messages/:id(.:format)             {:action=>"destroy", :controller=>"messages"}

EDIT:
Releated with How to destroy polymorphic model? Method destroy missing argument

  • 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-05-30T19:42:57+00:00Added an answer on May 30, 2026 at 7:42 pm

    You need to say message_path (singular) since it is the path for a single message:

    link_to "Delete", message_path(message.id), :method => :delete
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very simple link table set up, I need to delete rows
Simple question: do I have to delete or delete [] c ? Does the
i have simple regular expression: ^123$ Matches are for example 123 1234 etc. How
I have simple form. <form target=_blank action=somescript.php method=Post id=simpleForm> <input type=hidden name=url value=http://...> <input
I have simple SSIS package in which On Error event handler I have created
I'm creating an app where I have a simple delete record on the index
I Have simple PHP functions that produce html links which should delete a record,
i have a simple html table where i want to delete and add rows
I have a delete file link on a page: <form id=myForm runat=server> <asp:LinkButton ID=deleteFileLink
I use flash[:error] to display a simple message to users that they cannot do

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.