ruby on rails - Using a normal text link instead of a form -


i writing small application using rails 3. in 1 part of there link (should link) if clicked adds connection between 2 people (see below).

what needing use normal text link instead of form, how done?

<%= form_for([@profile, @contact]) |f| %>      <p><%= f.hidden_field :profile_id, :value => params[:profile_id] %></p>     <p><%= f.hidden_field :friend_id, :value => profile.id %></p>      <p><%= f.submit %></p>  <% end %> 

something like:

<%= link_to 'link these persons', [@profile, @contact], :method => :post, :profile_id => params[:profile_id], :friend_id => profile.id %> 

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -