Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CreateUsers < ActiveRecord::Migration
- def self.up
- create_table :users do |t|
- t.string :username
- t.string :password
- t.string :security_number
- end
- end
- def self.down
- drop_table :users
- end
- end
- <%= 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 |message| %>
- <li><%= message %></li>
- <% end %>
- </ul>
- </div>
- <% end %>
- <div class="actions">
- <%= f.submit %>
- </div>
- <% end %>
- <div class="field">
- <%= f.label :name %>
- <%= f.text_field :name %>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement