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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:30:05+00:00 2026-05-16T08:30:05+00:00

I’m still new to Ruby on Rails and I’m currently having a issue with

  • 0

I’m still new to Ruby on Rails and I’m currently having a issue with routing and redirecting.

I have two controllers “candidate” and “survey”. I’m currently viewing “canidate/editEmail.html”

http://www.otoplusvn.com/TherapistSurvey/candidates/editEmail/2

Once the submit button is clicked, the candidate’s method for updating the email is executed:

  def updateEmail
    @candidate = Candidate.find(params[:id])

    respond_to do |format|
      if @candidate.update_attributes(params[:candidate])
        flash[:notice] = 'Candidate email was successfully updated.'
        format.html { redirect_to :controller => "survey", :action => "end" }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @candidate.errors, :status => :unprocessable_entity }
      end
    end
  end

This code will update the Candidate’s email in the database and redirect it. I want to redirect it to an html page called end.html.erb that is located under the view/Survey/end.html.erb. However, With the present code it will give me a

Unknown action

No action responded to show. Actions: download and lastPage

where download and lastPage are the only methods in the Survey controller. “end” is not a method defined in the survey_controller.rb, but I assumed that it would automatically jump to the end.html.erb located under views/survey

On my local machine, I’m able to get this to work with this updated code:

format.html { redirect_to :controller => "survey/end" }

But this doesn’t work on the site that I loaded the ruby on rail application on. In either case, I think there is probably an easier way to do this and i’m doing this incorrectly.

I think it has to deal with the route.rb file or permission that I’m unaware of when you port a local ruby on rail application to a host.

Normally I would think that if i went directly to the file

http://www.otoplusvn.com/TherapistSurvey/survey/end

I would be able to see the page like I was able on my local machine, but I’m not able to with what I have hosted.

In general, I just want to be able to redirect (jump) to another html page indicating that the email update was done correctly and that the survey is over. This is all triggered by hitting a submit button that result in an update to the database being called an a redirect to another page. The problem being how to do the redirect correctly.

BTW: in my routes.rb I have

 map.resources :survey

Any Advice Appreciated. Thanks!
D

  • 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-16T08:30:05+00:00Added an answer on May 16, 2026 at 8:30 am

    You need add all other action you want.

    map.resources add only route need by ressources browsing.

    So add in collection option your method end in your case

    map.resources :survey, :collection => {:end => :get}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
We're building an app, our first using Rails 3, and we're having to build
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
this is what i have right now Drawing an RSS feed into the php,
I have just tried to save a simple *.rtf file with some websites and
I am trying to loop through a bunch of documents I have to put
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a bunch of posts stored in text files formatted in yaml/textile (from
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have some data like this: 1 2 3 4 5 9 2 6

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.