forked from brgtrainings/voting-app-sinatra
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
017d90c
commit 939769c
Showing
51 changed files
with
118 additions
and
58,261 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
require 'bcrypt' | ||
|
||
class User < ActiveRecord::Base | ||
# users.password_hash in the database is a :string | ||
include BCrypt | ||
has_secure_password | ||
validates :username,presence: true | ||
validates :username,uniquensess:true | ||
has_many :grievances | ||
end |
Oops, something went wrong.