% if signup ||= false %> <% fields = profile.class.signup_custom_fields environment%> <% else %> <% fields = profile.class.active_custom_fields environment%> <% end %> <% editing_profile ||= false %> <% fields.each do |field| %> <% rendered = render(:partial => "custom_fields/#{field.format}", :locals => {:field => field, :profile => profile, :name => "profile_data[custom_values[#{field.name}[value]]]"})%>