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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:33:22+00:00 2026-05-20T23:33:22+00:00

I am having trouble deleting multiple konkurrancers with checkboxes. I get this error in

  • 0

I am having trouble deleting multiple konkurrancers with checkboxes.
I get this error in view when submitting my form:

  Routing Error

No route matches "/admin/konkurrancers/delete_multiple"

My index.erb.html:

<h1>Alle konkurrencer</h1>
<div id="konkurrancer"><%= render 'konkurrencer', :remote => true %></div>
<%= link_to 'Opret konkurrence', new_admin_konkurrancer_path, :class => 'link' %>
<%= link_to 'Tilbage', :admin, :class => 'admina' %>

My _konkurrencer partial:

  <% form_tag delete_multiple_admin_konkurrancers_path do %>
<div id="tabel">
<table id="tabel1" border="0" bordercolor="#000000" style="background-color:#FFFFFF" width="950" cellpadding="0" cellspacing="0">
    <tr id="toptr">
    <td>&nbsp;</td>
      <td ><%= sortable "name", "Navn" %></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
   </tr>
<% for konkurrancer in @konkurrancers %>
   <tr class="thumbnail-item" onmouseout="this.style.background='white';" onmouseover="this.style.background='#99ff33';this.style.cursor='pointer'">
    <td><%= check_box_tag "konkurrancer_ids[]", konkurrancer.id %></td>
    <td>&nbsp;</td>
    <td><%= link_to 'Vis', admin_konkurrancer_path(konkurrancer.id) %></td>
    <td><%= link_to 'Redigere', {:action => 'edit', :id => konkurrancer.id}, :class => 'action edit' %></td>
    <td><%= link_to 'Slet', admin_konkurrancer_path(konkurrancer.id), :confirm => 'Are you sure?', :method => :delete %></td>
   </tr>
 <% end %>
</table>
<div id="pagenavi">
<%= submit_tag "Delete Checked" %>  
<% end %>  
<%= hidden_field_tag :direction, params[:direction] %>
<%= hidden_field_tag :sort, params[:sort] %>
</div>

My admin/konkurrancers controller:

def delete_multiple
    @konkurrancer = Konkurrancer.find(params[:konkurrancer_ids])
    @konkurrancer.each do |konkurrancer|
    konkurrancer.destroy
    end
end

My routes:

delete_multiple_admin_konkurrancers DELETE /admin/konkurrancers/delete_multiple(
.:format) {:action=>"delete_multiple", :controller=>"admin/konkurrancers"}
                admin_konkurrancers GET    /admin/konkurrancers(.:format)
          {:action=>"index", :controller=>"admin/konkurrancers"}
                                    POST   /admin/konkurrancers(.:format)
          {:action=>"create", :controller=>"admin/konkurrancers"}
             new_admin_konkurrancer GET    /admin/konkurrancers/new(.:format)
          {:action=>"new", :controller=>"admin/konkurrancers"}
            edit_admin_konkurrancer GET    /admin/konkurrancers/:id/edit(.:forma
t)        {:action=>"edit", :controller=>"admin/konkurrancers"}
                 admin_konkurrancer GET    /admin/konkurrancers/:id(.:format)
          {:action=>"show", :controller=>"admin/konkurrancers"}
                                    PUT    /admin/konkurrancers/:id(.:format)
          {:action=>"update", :controller=>"admin/konkurrancers"}
                                    DELETE /admin/konkurrancers/:id(.:format)
          {:action=>"destroy", :controller=>"admin/konkurrancers"}

My routes.rb

namespace :admin do
resources :konkurrancers do
collection do
delete :delete_multiple
end
end
end

  • 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-20T23:33:23+00:00Added an answer on May 20, 2026 at 11:33 pm

    The error is because the path you’re looking for is not defined properly in your routes file.

    I don’t think that syntax is supported in rails3, you seem to be using a mix of rails3 and rails2.x. Run rake routes from the root of the app, it will show you all the routes you have. Using your syntax I get no mention of the delete_multiple path. This should work:

      namespace :admin do
        resources :konkurrancers do
          collection do
            delete :delete_multiple
          end
        end
      end
    

    Now, since you’re using a standard form_tag, I believe the default method is POST, you want to change this to DELETE so the route works properly. Change your form tag to:

    form_tag delete_multiple_admin_konkurrancers_path, :method => :delete
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having some trouble deleting a cookie containing multiple values - the values are
Having trouble with this jQuery function: $(#content).siblings().each(function(i){ heightOfSiblings = heightOfSiblings + this.outerHeight(); }); Error
I am having trouble deleting orphan nodes using JPA with the following mapping @OneToMany
I`m having trouble trying to optimize this query with OVER (PARTITION BY ...) because
I am having some trouble deleting documents from Solr index. I use following code:
Having trouble looping through multiple rows in a SQL table and getting the info
Having trouble getting this syntax right: SELECT DISTINCT id FROM metadata WHERE (meta_key =
Having trouble with this -- a couple of other related posts out there, but
I'm having trouble with deleting my template. My template and destructor: template<class S, class
I'm having some major trouble deleting directories. I'm working building a ADMIN tool to

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.