Posted By

nhutto on 02/13/09


Tagged

form link content dynamic create Linking


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

webstic
davidsi
octoberborn


Create Links To Page


 / Published in: Rails
 

  1. <h1>New link</h1>
  2.  
  3. <% form_for(@link) do |f| %>
  4. <%= f.error_messages %>
  5.  
  6. <p>
  7. <%= f.label :name %><br />
  8. <%= f.text_field :name %>
  9. </p>
  10. <p>
  11. <%= select("link", "content_id", Content.find(:all).collect {|c| [ c.title, c.id ] }, { :include_blank => true }) %>
  12. </p>
  13. <p>
  14. <%= f.submit "Create" %>
  15. </p>
  16. <% end %>
  17.  
  18. <%= link_to 'Back', links_path %>

Report this snippet  

You need to login to post a comment.