Commit a1b7cb4302d6e594f9539823605af9fb6f1b4320
1 parent
8ef4552f
Exists in
master
and in
1 other branch
sign up form getting correct. formtastic
Showing
2 changed files
with
11 additions
and
9 deletions
Show diff stats
app/views/users/_inputs.html.erb
1 | -<fieldset class="inputs"> | |
2 | - <%= form.string :email %> | |
3 | - <%= form.password :password %> | |
4 | - <%= form.password :password_confirmation %> | |
5 | -</fieldset> | |
1 | +<% form.inputs do %> | |
2 | + <%= form.input :email %> | |
3 | + <%= form.input :password %> | |
4 | + <%= form.input :password_confirmation %> | |
5 | +<% end %> | |
6 | 6 | ... | ... |
app/views/users/new.html.erb
1 | 1 | <h2>Sign up</h2> |
2 | 2 | |
3 | -<% form.inputs do %> | |
4 | - <%= form.input :email %> | |
5 | - <%= form.input :password %> | |
6 | - <%= form.input :password_confirmation %> | |
3 | +<% semantic_form_for @user do |form| %> | |
4 | + <%= form.error_messages %> | |
5 | + <%= render :partial => "/users/inputs", :locals => { :form => form } %> | |
6 | + <% form.buttons do %> | |
7 | + <%= form.commit_button "Sign up" %> | |
8 | + <% end %> | |
7 | 9 | <% end %> |
8 | 10 | ... | ... |