<% @i = 0 %> <% @form_to_show.form_show.values[1].each do |key,vlaue|%> <%end%> <%=form_for @form_to_show ,:url=>{:controller=>"cancerpredicts" ,:action=>"edit"} do |form|%> <%= form.fields_for :form_show do |formfield|%> <% @form_to_show.form_show.each do |num,property| %> <% property.each do |key,value|%> <% @value= value %> <% if @value.class == BSON::Document || @value.class == Hash %> <% @disp_value = @value[I18n.locale.to_s] rescue "" %> <%else%> <%Fixnum%> <% @disp_value = @value %> <%end%> <%end%> <%end%> <%end%> <%end%>
<%=key%>
<%= formfield.text_field key,{:value=>@disp_value}%>