Create Links To Page


/ Published in: Rails
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.