yong gu wrote:
When you click “Join!”, you want to create a participant and then
to somewhere, is that right?
If so, you should post your data to the controller, by using <%= link_to
“Participer!”, participants_path, :method => :post,
:group_id => @group.id %>. when you click the link, the ‘create’
in the according controller will be executed.
or you could create a form yourself, just put your parameters in the
Yes i know i could use a form but i prefer to use a link_to. Is it
better use a from instead?
I did this:
<%= link_to “Participer!”, new_participant_path, :method =>
:post,:defi_id => item.id,:user_id => 2 %>
but it still doesn’t create the data into de db, it redirects me to the