Skip to content

Instantly share code, notes, and snippets.

@palominoz
Created January 13, 2012 17:04
Show Gist options
  • Save palominoz/1607543 to your computer and use it in GitHub Desktop.
Save palominoz/1607543 to your computer and use it in GitHub Desktop.
simple form_for a user model
<%- form_for @user do |form| -%>
<%= form.error_messages %>
<ul>
<li>
<%= form.label :email %>
<%= form.text_field :email %>
</li>
<li>
<%= form.label :password %>
<%= form.password_field :password %>
</li>
<li>
<%= form.label :password_confirmation, 'Confirm Password' %>
<%= form.password_field :password_confirmation %>
</li>
<li class="submit">
<%= submit_tag 'Sign Up', :disable_with => 'Signing you up...' %>
or <%= link_to 'sign in', new_session_path %>
</li>
</ul>
<%- end -%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment