Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sample_app
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
Mai Hoang Thai Ha
sample_app
Commits
d8634175
Commit
d8634175
authored
Jun 17, 2021
by
Mai Hoang Thai Ha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
96982abf
Pipeline
#1281
canceled with stages
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
app/models/user.rb
+5
-4
No files found.
app/models/user.rb
View file @
d8634175
...
...
@@ -46,21 +46,21 @@ class User < ApplicationRecord
update_attribute
(
:activated_at
,
Time
.
zone
.
now
)
end
# Sends activation email
# Sends activation email
def
send_activation_email
UserMailer
.
account_activation
(
self
).
deliver_now
end
private
# Convaerts email to all lowr_case
# Convaerts email to all lowr_case
def
downcase_email
self
.
email
=
email
.
downcase
end
# Creates and assigns the activation token digest
# Creates and assigns the activation token digest
def
create_activation_digest
self
.
activation_token
=
User
.
new_token
self
.
activation_digest
=
User
.
digest
(
activation_token
)
self
.
activation_digest
=
User
.
digest
(
activation_token
)
end
end
\ No newline at end of file
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