Sha256: 0a54ed3581b32c4fa80c500bb8dfda7aedc48340d3bf8a18ca36e3e38c9880e1
Contents?: true
Size: 712 Bytes
Versions: 4
Compression:
Stored size: 712 Bytes
Contents
/ You might not need to have a template for your form. In case you / don't have any special need, just use form.render and that's it. / Specify renderer you want to use. = form.errors.render(ErrorsListRenderer.new) / Haml tags can take hash as an argument, so why not simply use form.attributes. %form{form.attributes} / Render tags you want to display. = form.post.title.render / Iterate over elements - form.post.tags.each do |tag| = tag.render / Or write fully customized HTML. %label{for: "input-body"} - if form.post.errors.on(:title) %input#input-title.errors{name: "post[title]", value: form.post.title} - else %input#input-title{name: "post[title]", value: form.post.title}
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
formidable-0.1.2 | examples/posts/form.html.haml |
formidable-0.1.1 | examples/posts/form.html.haml |
formidable-0.1 | examples/posts/form.html.haml |
formidable-0.0.1 | examples/posts/form.html.haml |