Created
September 13, 2017 13:03
-
-
Save soulfly/23d973efe383fc4981de3ca4ccc18cbb to your computer and use it in GitHub Desktop.
This file contains 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
class User < ApplicationRecord | |
validates :login, presence: true, uniqueness: true | |
end | |
class CreateUsers < ActiveRecord::Migration[5.1] | |
def change | |
create_table :users do |t| | |
t.string :login | |
t.string :full_name | |
t.timestamps | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment