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
Nguyen Ngoc Nghia
VeNJOB
Commits
1c87aafb
Commit
1c87aafb
authored
Dec 09, 2019
by
nnnghia98
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
send email request
parent
e687f811
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
89 additions
and
8 deletions
+89
-8
app/controllers/Users/passwords_controller.rb
+34
-0
app/mailers/user_mailer.rb
+5
-0
app/views/users/mailer/confirmation_instructions.html.erb
+5
-0
app/views/users/mailer/email_changed.html.erb
+7
-0
app/views/users/mailer/password_change.html.erb
+3
-0
app/views/users/mailer/reset_password_instructions.html.erb
+8
-0
app/views/users/mailer/unlock_instructions.html.erb
+7
-0
app/views/users/shared/_links.html.erb
+6
-6
config/environments/development.rb
+11
-1
config/routes.rb
+3
-1
No files found.
app/controllers/Users/passwords_controller.rb
0 → 100644
View file @
1c87aafb
# frozen_string_literal: true
class
Users
::
PasswordsController
<
Devise
::
PasswordsController
# GET /resource/password/new
# def new
# super
# end
# POST /resource/password
# def create
# super
# end
# GET /resource/password/edit?reset_password_token=abcdef
# def edit
# super
# end
# PUT /resource/password
# def update
# super
# end
# protected
# def after_resetting_password_path_for(resource)
# super(resource)
# end
# The path used after sending reset password instructions
# def after_sending_reset_password_instructions_path_for(resource_name)
# super(resource_name)
# end
end
app/mailers/user_mailer.rb
0 → 100644
View file @
1c87aafb
class
UserMailer
<
ActionMailer
::
Base
include
Devise
::
Mailers
::
Helpers
default
:from
=>
ENV
[
"EMAIL_ADDRESS"
]
end
app/views/users/mailer/confirmation_instructions.html.erb
0 → 100644
View file @
1c87aafb
<p>
Welcome
<%=
@email
%>
!
</p>
<p>
You can confirm your account email through the link below:
</p>
<p>
<%=
link_to
'Confirm my account'
,
confirmation_url
(
@resource
,
confirmation_token:
@token
)
%>
</p>
app/views/users/mailer/email_changed.html.erb
0 → 100644
View file @
1c87aafb
<p>
Hello
<%=
@email
%>
!
</p>
<%
if
@resource
.
try
(
:unconfirmed_email?
)
%>
<p>
We're contacting you to notify you that your email is being changed to
<%=
@resource
.
unconfirmed_email
%>
.
</p>
<%
else
%>
<p>
We're contacting you to notify you that your email has been changed to
<%=
@resource
.
email
%>
.
</p>
<%
end
%>
app/views/users/mailer/password_change.html.erb
0 → 100644
View file @
1c87aafb
<p>
Hello
<%=
@resource
.
email
%>
!
</p>
<p>
We're contacting you to notify you that your password has been changed.
</p>
app/views/users/mailer/reset_password_instructions.html.erb
0 → 100644
View file @
1c87aafb
<p>
Hello
<%=
@resource
.
email
%>
!
</p>
<p>
Someone has requested a link to change your password. You can do this through the link below.
</p>
<p>
<%=
link_to
'Change my password'
,
edit_password_url
(
@resource
,
reset_password_token:
@token
)
%>
</p>
<p>
If you didn't request this, please ignore this email.
</p>
<p>
Your password won't change until you access the link above and create a new one.
</p>
app/views/users/mailer/unlock_instructions.html.erb
0 → 100644
View file @
1c87aafb
<p>
Hello
<%=
@resource
.
email
%>
!
</p>
<p>
Your account has been locked due to an excessive number of unsuccessful sign in attempts.
</p>
<p>
Click the link below to unlock your account:
</p>
<p>
<%=
link_to
'Unlock my account'
,
unlock_url
(
@resource
,
unlock_token:
@token
)
%>
</p>
app/views/users/shared/_links.html.erb
View file @
1c87aafb
<%-
if
controller_name
!=
"sessions"
%>
<%=
link_to
"Log in"
,
new_session_path
(
resource_name
)
%>
<br
/>
<%=
link_to
"Log in"
,
new_session_path
(
resource_name
)
%>
<br/>
<%
end
%>
<%-
if
devise_mapping
.
registerable?
&&
controller_name
!=
"registrations"
%>
<%=
link_to
"Sign up"
,
new_registration_path
(
resource_name
)
%>
<br
/>
<%=
link_to
"Sign up"
,
new_registration_path
(
resource_name
)
%>
<br/>
<%
end
%>
<%-
if
devise_mapping
.
recoverable?
&&
controller_name
!=
"passwords"
&&
controller_name
!=
"registrations"
%>
<%=
link_to
"Forgot your password?"
,
new_password_path
(
resource_name
)
%>
<br
/>
<%=
link_to
"Forgot your password?"
,
new_password_path
(
resource_name
)
%>
<br/>
<%
end
%>
<%-
if
devise_mapping
.
confirmable?
&&
controller_name
!=
"confirmations"
%>
<%=
link_to
"Didn't receive confirmation instructions?"
,
new_confirmation_path
(
resource_name
)
%>
<br
/>
<%=
link_to
"Didn't receive confirmation instructions?"
,
new_confirmation_path
(
resource_name
)
%>
<br/>
<%
end
%>
<%-
if
devise_mapping
.
lockable?
&&
resource_class
.
unlock_strategy_enabled?
(
:email
)
&&
controller_name
!=
"unlocks"
%>
<%=
link_to
"Didn't receive unlock instructions?"
,
new_unlock_path
(
resource_name
)
%>
<br
/>
<%=
link_to
"Didn't receive unlock instructions?"
,
new_unlock_path
(
resource_name
)
%>
<br/>
<%
end
%>
<%-
if
devise_mapping
.
omniauthable?
%>
<%-
resource_class
.
omniauth_providers
.
each
do
|
provider
|
%>
<%=
link_to
"Sign in with
#{
OmniAuth
::
Utils
.
camelize
(
provider
)
}
"
,
omniauth_authorize_path
(
resource_name
,
provider
)
%>
<br
/>
<%=
link_to
"Sign in with
#{
OmniAuth
::
Utils
.
camelize
(
provider
)
}
"
,
omniauth_authorize_path
(
resource_name
,
provider
)
%>
<br/>
<%
end
%>
<%
end
%>
config/environments/development.rb
View file @
1c87aafb
...
...
@@ -60,5 +60,15 @@ Rails.application.configure do
# routes, locales, etc. This feature depends on the listen gem.
config
.
file_watcher
=
ActiveSupport
::
EventedFileUpdateChecker
config
.
action_mailer
.
default_url_options
=
{
host:
'localhost'
,
port:
3000
}
config
.
action_mailer
.
default_url_options
=
{
host:
"localhost"
,
port:
3000
}
#Letter opener
config
.
action_mailer
.
delivery_method
=
:letter_opener
config
.
action_mailer
.
perform_deliveries
=
true
#Mailcatcher
config
.
action_mailer
.
delivery_method
=
:smtp
config
.
action_mailer
.
smtp_settings
=
{
:address
=>
"localhost"
,
:port
=>
1025
}
end
config/routes.rb
View file @
1c87aafb
...
...
@@ -3,7 +3,9 @@ Rails.application.routes.draw do
resources
:industries
,
only: :index
resources
:cities
,
only: :index
resources
:jobs
,
only: :index
devise_for
:users
devise_for
:users
,
controllers:
{
# sessions: 'users/sessions'
}
root
"static_pages#index"
get
"static_pages/index"
namespace
:users
do
...
...
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