mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
user model
This commit is contained in:
parent
19323838e9
commit
e49dfcb09a
8
app/models/user.rb
Normal file
8
app/models/user.rb
Normal file
@ -0,0 +1,8 @@
|
||||
class User
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
|
||||
field :username, type: String
|
||||
field :email, type: String
|
||||
field :password, type: String
|
||||
end
|
||||
11
test/fixtures/users.yml
vendored
Normal file
11
test/fixtures/users.yml
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
|
||||
|
||||
# This model initially had no columns defined. If you add columns to the
|
||||
# model remove the '{}' from the fixture names and add the columns immediately
|
||||
# below each fixture, per the syntax in the comments below
|
||||
#
|
||||
one: {}
|
||||
# column: value
|
||||
#
|
||||
two: {}
|
||||
# column: value
|
||||
7
test/unit/user_test.rb
Normal file
7
test/unit/user_test.rb
Normal file
@ -0,0 +1,7 @@
|
||||
require 'test_helper'
|
||||
|
||||
class UserTest < ActiveSupport::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
||||
Loading…
Reference in New Issue
Block a user