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
2
Merge Requests
2
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
Thanh Hung Pham
veNJOB
Commits
e68e20e4
Commit
e68e20e4
authored
Jul 06, 2017
by
Thanh Hung Pham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
7dc1c878
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
app/controllers/confirmations_controller.rb
+8
-3
app/views/devise/confirmations/information.html.erb
+1
-1
No files found.
app/controllers/confirmations_controller.rb
View file @
e68e20e4
class
ConfirmationsController
<
Devise
::
ConfirmationsController
def
update_confirm
@user
=
User
.
find
(
params
[
:id
])
@user
=
User
.
find
(
params
[
:
user
][
:
id
])
if
@user
.
save
set_flash_message!
(
:notice
,
:confirmed
)
redirect_to
edit_user_registration_path
(
resource_name
,
resource
)
...
...
@@ -10,7 +10,7 @@ class ConfirmationsController < Devise::ConfirmationsController
end
# GET /resource/confirmation?confirmation_token=abcdef
def
show
def
show
self
.
resource
=
resource_class
.
confirm_by_token
(
params
[
:confirmation_token
])
yield
resource
if
block_given?
...
...
@@ -20,11 +20,16 @@ def show
else
respond_with_navigational
(
resource
.
errors
,
status: :unprocessable_entity
){
render
:new
}
end
end
end
protected
def
after_confirmation_path_for
(
resource_name
,
resource
)
render
'devise/confirmations/information'
,
resource:
resource
end
private
def
user_params
params
.
requires
(
:user
).
permit
(
:email
,
:fullname
,
:password
,
:cd_name
)
end
end
app/views/devise/confirmations/information.html.erb
View file @
e68e20e4
...
...
@@ -2,7 +2,7 @@
<div
class=
"well"
>
<h2>
Register
</h2>
<%=
form_for
(
resource
,
url:
confirmations_update_confirm_path
,
html:
{
method: :post
})
do
|
f
|
%>
<%=
form_for
(
resource
,
url:
confirmations_update_confirm_path
(
resource
)
,
html:
{
method: :post
})
do
|
f
|
%>
<%=
devise_error_messages!
%>
<div
class=
"form-group"
>
...
...
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