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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:46:29+00:00 2026-05-18T02:46:29+00:00

This irritates me right now, and I’ve been at it for more than an

  • 0

This irritates me right now, and I’ve been at it for more than an hour. Maybe one of you has an idea.

I’ve defined the following routes in routes.rb:

resources :ads do
  member do
    post :preview_revision
    get :revise
  end
  collection do
    get :search
    post :preview
  end
end

When I run rake routes, the preview_revision route is shown correctly:

preview_revision_ad POST   /ads/:id/preview_revision(.:format) {:action=>"preview_revision", :controller=>"ads"}

However, when I make a POST request to /ads/145/preview_revision, I get the following error:

Started POST "/ads/145/preview_revision" for 127.0.0.1 at Mon Nov 15 17:45:51 +0100 2010

ActionController::RoutingError (No route matches "/ads/145/preview_revision"):


Rendered /Library/Ruby/Gems/1.8/gems/actionpack-3.0.1/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (1.2ms)
  • The id (145) exists, yes.
  • The action and the controller (action: preview_revision, controller: ads) exist as well.
  • All the other routes work perfectly fine
  • I've tried restarting the server several times
  • I double-checked that it's actually a POST request, that the ID is correct, I really don't know what to do anymore.
  • Rails version is 3.0.1

--- UPDATE ---

I tried changing the method from POST to PUT, and now it works. Apparently POST routes on member level are not working, or not allowed.

Still, I want to know why. I do know that POST is for creating a member, so a POST request on a member makes no sense, but I didn't find this mentioned anywhere in the Rails guides, and why would rake routes display the route, if it doesn't actually work? Is that a bug?

--- UPDATE 2 ---

The Rails Routing guide (Edge version) specifically says:

2.9.1 Adding Member Routes

To add a member route, just add a
member block into the resource block:

resources :photos
  do   member do
    get 'preview'
  end
end

This will recognize /photos/1/preview
with GET, and route to the preview
action of PhotosController. It will
also create the preview_photo_url and
preview_photo_path helpers.

Within the block of member routes,
each route name specifies the HTTP
verb that it will recognize. You can
use get, put, post, or delete here. If
you don’t have multiple member routes,
you can also pass :on to a route,
eliminating the block [...]

So is the POST on member possible or not possible? Am I missing something? Just to be clear, I don't wanna use it anymore, but still, it bugs me not knowing why it doesn't work.

  • 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-18T02:46:30+00:00Added an answer on May 18, 2026 at 2:46 am

    The best thing to do, if you find a bug in actively maintained open-source software, is:

    • to submit a bug report to the project’s bug tracker isolating the problem as much as possible and with as much detail as possible, and, optionally,
    • to include a patch that fixes the bug if you can.

    The bug tracker for Rails is at rails.lighthouseapp.com.

    —edit—

    The bug tracker for Rails is now at github.com/rails/rails/issues.

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

Sidebar

Related Questions

This should be a simple one: I have an observableArray object called To in
This issue irritates me much. Somehow after installing wysiwig editor my comment body form
(Using the GUI builder) Does anyone have any idea what this thing wants from
This is a very simple question but it has irritated me. I would like
this is my first question in here, and I would like to ask if
This question is directly related to this SO question I posed about 15 minutes
This question is kind of a follow up to this question I asked a
This sequence satisfies a(n+2) = 2 a(n+1) + 2 a(n). and also a(n)=[(1+sqrt(3))^(n+2)-(1-sqrt(3))^(n+2)]/(4sqrt(3)). I
This is my code: <CheckBox android:id=@+id/sprint_checkbox android:layout_width=fill_parent android:layout_height=wrap_content android:text=@string/sprint_game /> <CheckBox android:id=@+id/marathon_checkbox android:layout_width=fill_parent android:layout_height=wrap_content
This code below allows me to find the word error in all my files

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.