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

  • Home
  • SEARCH
  • 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 4017448
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:51:43+00:00 2026-05-20T09:51:43+00:00

Been staring at this problem for a while now. Here’s the error I’m getting

  • 0

Been staring at this problem for a while now. Here’s the error I’m getting when I try to view the page.

No route matches {:action=>"confirm", :controller=>"locations"}

This is what I have in the view.

<%= form_for(@location, :url => { :action => :confirm }) do |f| %>
<% end %>

And I think my routes file is set up correctly.

Finder::Application.routes.draw do
  resources :locations do
    member do 
      post :confirm
    end
  end

  root :to => 'locations/index'
end

Any ideas?

Updated:

Ran rake routes and get what I think is correct.

confirm_location POST   /locations/:id/confirm(.:format) {:action=>"confirm", :controller=>"locations"}
  • 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-20T09:51:44+00:00Added an answer on May 20, 2026 at 9:51 am

    You can debug your routes easily in the future by running $ rake routes and looking at the output. 😉

    I think what is happening is that your post :confirm isn’t registering the route you’re expecting. In the guides, match and it’s brethren accept a string as a URL segment like so:

    resources :locations do
      member do
        post 'confirm'
      end
    end
    

    Note that “confirm” is now a string instead of a symbol.

    If this doesn’t help, run $ rake routes and tack the output onto your question.

    Update

    After seeing your rake output, I think that you just need to specify the POST method on your form_for:

    <%= form_for(@location, :url => { :action => :confirm }, :method => :post) do |f| %>
    <% end %>
    

    You can also make this more readable using that helper method that Rails defines:

    <%= form_for(@location, :url => confirm_location_path(@location), :method => :post) do |f| %>
    <% end %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been banging away at this for a while now and I can't seem
I have been using a SAX parser for a while now to get data
I know this must be a pretty common problem, but I haven't been able
i've been playing with MVC for a while now, but since the project i'm
I've been following this forum for sometime now but officially registered today. I'm a
Alright, I've been working on this for a while and cannot get it. I'm
I've been sharing image lists across multiple forms in Delphi for years now. I
Up until now I have been using std::string in my C++ applications for embedded
I don't know what this is called but here goes. public class Person {
After starting out with Python on Ubuntu Linux, I've now for a good while

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.