Conceptually, is it possible to have a form in Rails that accepts input for both User and Profile fields? If so, how could I execute that? Do I need to set the form_for for both User and Profile?
The goal is to have two forms (one on the homepage and one at signup) that could potentially mix user/profile information when saved. FYI – here is how I add a user:
user = User.new
user.email = ""
user.password = ""
user.profile = Profile.new
user.profile.save
user.save
Yes, you should look into
accepts_nested_attributes_for, addressed in the Rails docs here.For more information, please look into: