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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:35:49+00:00 2026-05-30T22:35:49+00:00

Getting Template is missing – Missing template ballots/submission error when trying to add a

  • 0

Getting “Template is missing – Missing template ballots/submission” error when trying to add a “publish” action to an otherwise RESTful controller. Clearly it is looking for a submission.html.haml view, which doesn’t exist (and shouldn’t).

class BallotsController < ApplicationController
  respond_to :html

  def index
  ...

  def publish
    @ballot = Ballot.find(params[:id])
    if @ballot.publishable?
      @ballot.submitted = true
      flash[:notice] = "Ballot successfully submitted" if @ballot.save
    else
      flash[:error] = "Could not submit. Ballot incomplete."
    end 
    respond_with(@ballot, location: ballot_url(@ballot))
  end
end

I’d like to respond with the “show” action in this controller in both cases. But not sure what syntax should be.

  • 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-30T22:35:50+00:00Added an answer on May 30, 2026 at 10:35 pm

    I think you can do a redirect_to in there to specify the path:

    respond_with(@ballot) do |format|
      format.html { redirect_to ballots_path }
    end
    

    (Replace ballots_path with your route.)

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

Sidebar

Related Questions

I'm getting a missing template error after I try rendering a partial from a
any time i write this: $this->setTemplate('module/action'); I'm getting this error: The template module/actionSuccess.php does
I am getting an error that I cannot figure out: ActionView::MissingTemplate (Missing template cluster/delete_stuff.erb
I'm getting the following error from g++ while trying to add iterator support for
I'm getting an error for this content template within a style: Must specify both
I am getting a template error during rendering, which I think would be easy
I'm trying to get devise to login but I'm getting a 500 error due
from a controller method, i'm trying to capture the output of rendering a template
I'm getting an ActionviewTemplate error when trying to POST using an ajax response. The
I am trying to add template functionality to my vector class, after already having

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.