- if f.object.present? tr.nested-fields td id="item_do_lote" = f.hidden_field :item_do_lote_id, value: f.object.id p.form-control-static = f.object.try(:item).try(:codigo_descricao_unidade_codigo_da_prefeitura) td = f.select :lote_id, options_from_collection_for_select(@lotes, :id, :numero, f.object.try(:lote_id)), { include_blank: false }, class: "form-control s2", id: "lote_id" = f.hidden_field :projeto_id, value: @projeto.id