Created
May 28, 2014 02:27
-
-
Save zackn9ne/7fbc35b51fbd1ef801a4 to your computer and use it in GitHub Desktop.
Ruby Form Field
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <h1>Sign Up</h1> | |
| <%= form_for @user do |f| %> | |
| <% if @user.errors.any? %> | |
| <div class="error_messages"> | |
| <h2>Form is invalid</h2> | |
| <ul> | |
| <% for message in @user.errors.full_messages %> | |
| <li><%= message %></li> | |
| <% end %> | |
| </ul> | |
| </div> | |
| <% end %> | |
| <p> | |
| <%= f.label :email %><br /> | |
| <%= f.text_field :email %> | |
| </p> | |
| <p> | |
| <%= f.label :password %><br /> | |
| <%= f.password_field :password %> | |
| </p> | |
| <p> | |
| <%= f.label :password_confirmation %><br /> | |
| <%= f.password_field :password_confirmation %> | |
| </p> | |
| <p class="button"><%= f.submit %></p> | |
| <% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment