My apologies if this has been asked before, but I'm not sure about this.
I would like to know if it's possible to use a form in Rails with multiple models.
I know you can do something like this
<%= form_for @users do |f| %>
In the form, I'm trying to create, I need form fields for 2 different models, because I need to use the attributes from the other model.
I was thinking something like this might work
<%= form_for @users, @songs do |f,g| %>
<%= f.label :username %>
<%= f.text_field :username %>
<%= g.label :song %>
<%= g.text_field :song %>
<% end %>
I believe this will work, but I'm not sure. Is this possible in Rails?