Topic: Beginner: Reference Form?
I have a model artists and now I would like create a model user_artist that should save the current logged user and a reference to the Artist. I take a new model because there could be later more than one user in this database for one artist.
Now I have the model and how can I save now the current user during the user creates a new Artist.
Here is my current form:
<%= form_for @artist do |f| %>
<%= f.label :name, "Name" %>
<%= f.submit "Create" %>
<% end -%>
How I must change this to simultaneously save the user in the database user_artist?
Last edited by freak (2012-12-09 04:17:56)