/ Published in: Rails
formfor is the most popular helper used when generating a form that binds to one type of object. The parameter you pass through formfor ("|f|") is of datatype FormBuilder which offers these methods: textfield, passwordfield, checkbox, and textarea
Expand |
Embed | Plain Text
<% form_for @story do |f| %> <p> name:<br /> <%= f.text_field :name %> </p> <p> link:<br /> <%= f.text_field :link %> </p> <p> <%= submit_tag %> </p> <% end %>
You need to login to post a comment.
