Add profiles to users

@cgruppioni @georgetmayorga
Yep! Reposting an earlier comment on this issue:



Doing it the normal way as expected in the form_for on a singular resource hits an error, as discussed on: rails/rails#1769. It seems like a very common problem when using singular resources and form_for for creates/updates.

I tried to put these routes within resource :profile under users, but that ran into many issues, even if I changed the form for route to:

<h2>Create Profile</h2>
<div class="new_profile_form">
  <%= form_for [@user, @profile] do |form| %>
    <%= render "form", form: form %>
  <% end %>
</div>

Hits an error for an undefined method user_profile_path. There's a workaround in that thread at rails/rails#1769 (comment), which works.