Skip to content

Instantly share code, notes, and snippets.

@elmariofredo
Created June 5, 2010 20:45
Show Gist options
  • Save elmariofredo/426980 to your computer and use it in GitHub Desktop.
Save elmariofredo/426980 to your computer and use it in GitHub Desktop.
# Template for simple_form(http://github.com/plataformatec/simple_form)
# Place in $RAILS_ROOT/lib/templates/haml/scaffold/_form.haml.erb
=simple_form_for(@<%= singular_name %>) do |f|
=f.error_messages
.inputs
<%- attributes.each do |attribute| -%>
=f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %>
<%- end -%>
.actions
=f.button :submit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment