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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:22:18+00:00 2026-05-23T09:22:18+00:00

How do you handle multiple models in a form? I know that nested models

  • 0

How do you handle multiple models in a form? I know that nested models exist, but I’m not sure if this is the same situation. Sorry, a bit new to Rails.

In my situation, a project profile has fields such as title, date, description, as well as moderators. Moderators reside on their own model however and this is also updated. Then there’s the File (name, filetype, etc.) and Contact (first_name, last_name, etc.) model which also belong to a project profile.

Here are the pseudo-relations between the models in case:
project_profile has_many moderators
project_profile has_many files
project_profile has_one contact

I would like to be able to edit all four from one form. How is this possible?
Thanks!

Rails 3.0.7
Ruby 1.9.2

  • 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-23T09:22:18+00:00Added an answer on May 23, 2026 at 9:22 am

    It’s possible, it’s called nested_attributes.

    See tutorial here: http://ryandaigle.com/articles/2009/2/1/what-s-new-in-edge-rails-nested-attributes

    Or screencast here: http://railscasts.com/episodes/196-nested-model-form-part-1

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

Sidebar

Related Questions

http://weblog.rubyonrails.org/2009/1/26/nested-model-forms This post helped in learning how to handle multiple models in a rails
Maybe that's not exactly the solution i need, but this is what i want
I need to modify a php search script so that it can handle multiple
I am looking for a searchable multiple select javascript widget that can handle filtering
Here's the situation: I have a website with a complex address form with multiple
DocumentsController#common_query can handle multiple different request styles. i.e. all docs in batch 4 or
What is the best way to handle multiple Flex/Bison parsers inside a project? I
PHP/MySQLisolating database access in class - how to handle multiple row Selects Here’s a
Using C#, is there a better way to handle multiple types of exceptions rather
First of all, I am a complete Java NOOB. I want to handle multiple

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.