/ Published in: Rails
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<h1>New link</h1> <% form_for(@link) do |f| %> <%= f.error_messages %> <p> <%= f.label :name %><br /> <%= f.text_field :name %> </p> <p> <%= select("link", "content_id", Content.find(:all).collect {|c| [ c.title, c.id ] }, { :include_blank => true }) %> </p> <p> <%= f.submit "Create" %> </p> <% end %> <%= link_to 'Back', links_path %>