-
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.
Adds devise, test suite for user model
- Loading branch information
1 parent
6f47ffc
commit 1e75694
Showing
12 changed files
with
553 additions
and
0 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
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
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,20 @@ | ||
class User < ApplicationRecord | ||
############################################################################################ | ||
## PeterGate Roles ## | ||
## The :user role is added by default and shouldn't be included in this list. ## | ||
## The :root_admin can access any page regardless of access settings. Use with caution! ## | ||
## The multiple option can be set to true if you need users to have multiple roles. ## | ||
petergate(roles: [:pizza_store_owner, :pizza_chef], multiple: false) ## | ||
Check failure on line 7 in app/models/user.rb
|
||
############################################################################################ | ||
|
||
PIZZA_STORE_OWNER = :pizza_store_owner | ||
PIZZA_CHEF = :pizza_chef | ||
|
||
|
||
# Include default devise modules. Others available are: | ||
# :confirmable, :lockable, :timeoutable, :trackable and :omniauthable | ||
devise :database_authenticatable, :registerable, | ||
:recoverable, :rememberable, :validatable | ||
|
||
validates :email, presence: true, uniqueness: true | ||
end |
Oops, something went wrong.