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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:22:44+00:00 2026-05-28T19:22:44+00:00

I would like to capture email addresses with this form: I have decided to

  • 0

I would like to capture email addresses with this form:

I have decided to create a model only for this and use the views and controller for a different model that is serving only static assets (think: newsletter sign-up).

<%= form_for (@signup) do |f| %>
 <% if @signup.errors.any? %>
  <div id="error_explanation">
   <p><%= pluralize(@signup.errors.count, "error") %> prohibited this post from being saved:</p>

   <ul>
    <% @signup.errors.full_messages.each do |user| %>
    <li><%= user %></li>
    <% end %>
   </ul>
  </div>
 <% end %>

 <div class="field">
  <%= f.label :email_address %><br />
  <%= f.email_field_tag :email_address %>
 </div>

 <div class="actions">
  <%= f.submit %>
 </div>

How do I get this form to work? I get undefined method signups_path for #<#<Class:0x00000004f1feb0>:0x00000004f09a98> exception, which is understandable (its looking for a SignupsController by convention).

But I want the form to display in a separate controller I call PagesController and send it to the Signup model.

Additional Info:

I tried passing url: pages_path in the form and get the same exception.

 # view inside PagesController
 <div class="four columns">
   <%= render 'form' %> 
 </div>

#stub of model
class PagesController < ApplicationController
 def index
  @signup = Signup.new
 end

def create
 @signup = Signup.new(params[:signup])
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-28T19:22:46+00:00Added an answer on May 28, 2026 at 7:22 pm

    try:

    <%= form_for @sighup, :url => {:controller => :pages, :action => :index} do |f| %>
    

    and I hope you didn’t forget the

    <% end %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to create a photo/video capture application. I have created a CaptureView
I would like to use the top 5 to capture the top 5 for
I have a document library site and would like to send an email when
I would like to capture special character from a line: var=`echo #this is comment
I would like to capture the mouse move event in my main form. Although
I have a batch file (.BAT) and would like to capture its output into
on submit of a form, I would like to capture the field names and
I am working on a web application and we would like to capture the
For performance testing, I would like to capture some traffic from a production server
In Android I am writing an application in which, I would like to capture

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.