Skip to content

Commit

Permalink
Initial spike on user model
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanlabouve committed Apr 12, 2016
1 parent 4ede77c commit 7f8591c
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/models/user.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class User < ActiveRecord::Base
end
11 changes: 11 additions & 0 deletions db/migrate/20160412055926_create_users.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class CreateUsers < ActiveRecord::Migration
def change
create_table :users do |t|
t.string :password_digest
t.string :name
t.string :email

t.timestamps null: false
end
end
end
10 changes: 9 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20160412054952) do
ActiveRecord::Schema.define(version: 20160412055926) do

create_table "posts", force: :cascade do |t|
t.string "title"
Expand All @@ -21,4 +21,12 @@
t.datetime "updated_at", null: false
end

create_table "users", force: :cascade do |t|
t.string "password_digest"
t.string "name"
t.string "email"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end

end
11 changes: 11 additions & 0 deletions test/fixtures/users.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html

one:
password_digest: MyString
name: MyString
email: MyString

two:
password_digest: MyString
name: MyString
email: MyString
7 changes: 7 additions & 0 deletions test/models/user_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require 'test_helper'

class UserTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

0 comments on commit 7f8591c

Please sign in to comment.