Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
venjob
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Huỳnh Thiên Phước
venjob
Commits
771ad7d0
Commit
771ad7d0
authored
Aug 18, 2020
by
Huỳnh Thiên Phước
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix routes
parent
0ce58138
Pipeline
#931
canceled with stages
in 0 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
app/models/user.rb
+1
-1
config/routes.rb
+3
-3
No files found.
app/models/user.rb
View file @
771ad7d0
...
...
@@ -17,7 +17,7 @@ class User < ApplicationRecord
validates
:email
,
presence:
true
,
format:
{
with:
VALID_EMAIL_REGEX
},
uniqueness:
{
case_sensitive:
false
}
PASSWORD_FORMAT
=
/\A(?=.{
8
,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])/x
PASSWORD_FORMAT
=
/\A(?=.{
6
,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])/x
validates
:password
,
allow_nil:
true
,
format:
{
with:
PASSWORD_FORMAT
,
message:
"is too short or not strength"
}
def
self
.
new_remember_token
...
...
config/routes.rb
View file @
771ad7d0
...
...
@@ -3,9 +3,9 @@ Rails.application.routes.draw do
resources
:users
resources
:sessions
,
only:
[
:new
,
:create
,
:destroy
]
match
'/my'
,
to:
'users#my_page'
,
via:
'get
'
,
as: :my_page
match
'/my/info'
,
to:
'users#my_info'
,
via:
'get
'
,
as: :my_page_info
match
'/login'
,
to:
'sessions#new'
,
via:
'get
'
,
as: :login
get
'/my'
,
to:
'users#my_page
'
,
as: :my_page
get
'/my/info'
,
to:
'users#my_info
'
,
as: :my_page_info
get
'/login'
,
to:
'sessions#new
'
,
as: :login
match
'/logout'
,
to:
'sessions#destroy'
,
via:
'delete'
,
as: :logout
resources
:jobs
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment