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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:06:19+00:00 2026-05-27T08:06:19+00:00

I have a small app where the index page is a form that instructs

  • 0

I have a small app where the index page is a form that instructs the user for their email, I have changed my route so that the root_path is the ‘new’ action which renders my form:

Oa::Application.routes.draw do
  resources :signups
  match "/confirm", :to => "pages#confirm"
  root :to => 'signups#new'
end

This is working fine, when I submit the form it is working fine. When I submit on the root page and I cause a validation error the address bar has the url localhost:3000/signups and shows me my validation errors, which is also good but if I were to manually visit http://localhost:3000/signups it gives me an error “The action ‘index’ could not be found for SignupsController”. Would it be ok if I created the ‘index’ action and redirect_to root_path so that I don’t receive the “The action ‘index’ could not be found for SignupsController” if I were to access http://localhost:3000/signups directly? Is this the proper way to do this?

class SignupsController < ApplicationController
  def index
    redirect_to root_path
  end

  def new
    @signup = Signup.new
  end

  def create
@signup = Signup.new(params[:signup])
if @signup.save
      UserMailer.registration_confirmation(@signup).deliver
  flash[:notice] = "Signup created successfully."
  redirect_to confirm_path
else
  render :action => "new"
    end
  end
end

Thanks!

J

  • 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-27T08:06:19+00:00Added an answer on May 27, 2026 at 8:06 am

    Do something like this:

    post '/' => 'signups#create'
    root to: 'signups#new'
    

    Do not use resources :signups

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

Sidebar

Related Questions

I have a small cakePHP app that allows for user's to login and be
I have a small winforms app that creates a new event log source. I
I have small test app: Socket socket = new Socket(jeck.ru, 80); PrintWriter pw =
I have small web app that generate PDF files as a report. I'm trying
I have a small app that has a Render thread. All this thread does
I have a small app that downloads some files from a remote (HTTP) server
I have a small app, where user can make some calculations and solve equations.
I have a relatively small app that Im building using vb.net 2.0, and nant.
I have a small WinForms app that utilizes a BackgroundWorker object to perform a
I have a small web app. Seven pages, 3.6 KB index.html and 855.5 KB

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.