Use your code in your controller. In the job code below, this is the model and profile of accepts_nested_attributes_for jobs. Replace @profile with any form. The second line is what will build the form fields if the form fields no longer exist.
def new
@profile = current_user.profile
1.times {@profile.jobs.build} unless current_user.profile.jobs.any?
end
, . , :
def new
@profile = current_user.profile
@profile.jobs.build unless current_user.profile.jobs.any?
end