Hi fellow Social Streamers -
I'm currently trying to customize the signup form (views/devise/registrations/new.html.erb). What I want to do is add a couple of fields which belong to the Profile. Now this form is for User, User includes Subject, and Subject accepts_nested_attributes_for Profile. So I was thinking I could just use fields_for in the view and add my profile fields there and it would all Just Work. Something like this inside the form_for:
<%= f.fields_for :profile do |ff| %>
<%= ff.label :country %>
<%= ff.text_field :country %>
<% end %>
However, the nested fields are not rendered. I thought I might need to set up a blank new Profile so I tried adding the following code before the form_for:
<%
resource.actor ||= Actor.new
resource.actor.profile ||= Profile.new
%>
But that didn't make any difference. Does anybody have any idea what I'm doing wrong and how I can add profile fields to the signup form?