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
Post a Comment