user model

This commit is contained in:
Andrew Brown 2012-12-22 19:29:13 -06:00
parent 19323838e9
commit e49dfcb09a
3 changed files with 26 additions and 0 deletions

8
app/models/user.rb Normal file
View 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
View 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
View File

@ -0,0 +1,7 @@
require 'test_helper'
class UserTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end