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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:17:53+00:00 2026-06-11T04:17:53+00:00

Generally if we can create only 1 record, say 1 user at a time

  • 0

Generally if we can create only 1 record, say 1 user at a time from the form. But what if I want to create multiple users from a single form? There are no associations with other models. How can i do that?

  • 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-06-11T04:17:54+00:00Added an answer on June 11, 2026 at 4:17 am

    You have to make a form with an array of users params .e.g

    <%= from_tag '/users/create_multiple' do %>
     <%= text_field_tag "users[][name]" %>
     <%= text_field_tag "users[][name]" %>
    <% end %>
    

    In UsersController:

    def create_multiple
     params[:users].each do |user|
      user = User.create(user)
     end
    end
    

    You can add validation code as per your wishes,
    visit here how to pass form params for multiple records http://guides.rubyonrails.org/form_helpers.html#basic-structures

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

Sidebar

Related Questions

Let say I create a branch called foo from master and while working on
I want to create a chat room using HTML5 web sockets, but am pretty
I trying to create inheritance so I can have some super classes with general
Anyone know where i can find a good comparison between the generally accepted Pro's
Please, can someone help me, how to get information of doc status... Generally, I
To have a general-purpose documentation system that can extract inline documentation of multiple languages,
I want to make an Application that only has a NotifyIcon. It doesn't need
I have a large book written in Microsoft Word and want to create a
I have to programmatically create a task for a user that was not explicitly
I've been trying to create a Jersey REST Webservice. I want to receive and

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.