0
I’m a beginner in Ruby. I have a table in a view, that when I click on the line/item it should take the ID of the selected line and pass to the other view that will be triggered, I’m 3 days searching on and I can’t implement.
The view that should take the ID or other parameter so that in the other I can treat select to bring more detailed information >>:
<td>
<%= link_to pedido.id, detalhes_backoffice_pedidos_path(:pedido_id => pedido.id) , :onclick=>"window.open(this.href,'create_company', 'height=600, width=600');return false;" %>
</td>
The view("popup") that is called when clicked on the request id. Obs.:I tried in many ways, and at the moment she is like this...>>>>
<div class='container-fluid'>
<div style='display: block;' class="col-xs-6 esquerdo ">
<label>Num.pedido<%= pedido.id %></label> <br>
<label>nome</label> <br>
<label>telefone</label> <br>
</div>
Controller>>
class Backoffice::PedidosController < BackofficeController
.....
def detalhes
render :layout => "application"
@pedido = params[:pedido_id]
end
I’m totally lost after trying so hard....
Thank you! But I had already solved, I’ve been studying a lot and this is the basics I should know, and about the tips, thanks again, I have to improve this.
– Jorge Miguel