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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:12:24+00:00 2026-05-26T08:12:24+00:00

Some background: I have a Posts controller which is used for users to create

  • 0

Some background: I have a Posts controller which is used for users to create or update posts. In a post form, a user starts writing their post. This post can either be saved as a draft (and then the form switches functionality to submit to the “update” action of the controller) and later be posted to a page, or be directly posted to a page.

These forms post remotely to a page, which appends a table with the post inside.

Currently, I have a problem: submitting a form breaks down because, in appending the table, I get an error “ActionView::Template::Error (No route matches {:action=>”vote”, :controller=>”posts”, :post_id=>245, :positive=>true})”. This refers to a line of code in the posts view:

 <%= link_to (image_tag("icons/upvote.png", :height => "15px")), vote_post_path(:post_id => post.id, :positive => true), :remote => true %>

I should mention that appending the post to the table is done by using an @post variable that remains available from the controller.

NOW the weird thing is that this error ONLY occurs when a post has been submitted directly to the “create” action, and trying to append the table with the post. When a saved draft is submitted to the “update” action and appended onto the table, this doesn’t occur.

Does anyone have any advice as to why this is? I can provide more code where relevant.

EDIT: the relevant section of my routes file:

 resources :posts do
   member do
     get :vote
   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-26T08:12:24+00:00Added an answer on May 26, 2026 at 8:12 am

    the problem is that you have the “vote” action as a member action, not a collection action. Switch it to:

     resources :posts do
    
       collection do
          get :vote 
    
       end
     end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a background thread and the thread calls some methods that update the
I have some code that starts a background process for search in my WPF
Some background: I have an database that I want to use linq-to-sql to update
Some background: we have a windows application (c#) that locate in the system try.
Some background: In Germany (at least) invoice numbers have to follow certain rules: The
Skip to the specific question as needed. Some background: The scenario: I have a
I have background music for some songs available in both .MID and .KAR formats,
Background: I have a ListView / GridView with several columns. In some situations, only
We have to use delayed_job (or some other background-job processor) to run jobs in
Hi all i have a background worker thread and some unmanaged code dlls ,

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.