Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- acts_as_authentic
- <h1>Listing users</h1>
- <table>
- <tr>
- <th>Username</th>
- <th>Email</th>
- <th></th>
- <th></th>
- <th></th>
- </tr>
- <% @users.each do |user| %>
- <tr>
- <td><%= user.username %></td>
- <td><%= user.email %></td>
- <td><%= link_to 'Show', user %></td>
- <td><%= link_to 'Edit', edit_user_path(user) %></td>
- <td><%= link_to 'Destroy', user, :confirm => 'Are you sure?', :method => :delete %></td>
- </tr>
- <% end %>
- </table>
- <br />
- <%= link_to 'New User', new_user_path %>
- <%= form_for(@user) do |f| %>
- <% if @user.errors.any? %>
- <div id="error_explanation">
- <h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>
- <ul>
- <% @user.errors.full_messages.each do |msg| %>
- <li><%= msg %></li>
- <% end %>
- </ul>
- </div>
- <% end %>
- <div class="field">
- <%= f.label :username %><br />
- <%= f.text_field :username %>
- </div>
- <div class="field">
- <%= f.label :email %><br />
- <%= f.text_field :email %>
- </div>
- <div class="field">
- <%= f.label :password %><br />
- <%= f.password_field :password %>
- </div>
- <div class="field">
- <%= f.label :password_confirmation %><br />
- <%= f.password_field :password_confirmation %>
- </div>
- <div class="actions">
- <%= f.submit %>
- </div>
- <% end %>
- -Password is too short (minimum is 4 characters)
- -Password confirmation is too short (minimum is 4 characters)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement