I have tables "tickets" and "notes" - tickets has_many notes.
I have added:
<td><%= link_to 'Add note', new_note_path %></td>
to:
app/views/tickets/index.html.erb
which works OK but I need to be able to pass the value of ticket.id to
note.ticket_id - how do I do that?
Thanks,
Phil.
--
Philip Rhoades
Pricom Pty Limited (ACN 003 252 275 ABN 91 003 252 275)
GPO Box 3411
Sydney NSW 2001
Australia
E-mail: ph...@pricom.com.au
<td><%= link_to 'Add note', new_note_path(:ticket_id => ticket.id)
%></td>
or
<td><%= link_to 'Add note', new_note_path+"?ticket_id=#{ticket.id}"
%></td>
--
Posted via http://www.ruby-forum.com/.