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
2dd294bb
Commit
2dd294bb
authored
Jul 06, 2017
by
Thanh Hung Pham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Register complete
parent
9d05f8cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
app/controllers/confirmations_controller.rb
+3
-3
app/views/devise/confirmations/information.html.erb
+1
-1
No files found.
app/controllers/confirmations_controller.rb
View file @
2dd294bb
class
ConfirmationsController
<
Devise
::
ConfirmationsController
class
ConfirmationsController
<
Devise
::
ConfirmationsController
def
update_confirm
def
update_confirm
@user
=
User
.
find
(
params
[
:user
][
:id
])
@user
=
User
.
find
(
params
[
:user
][
:id
])
if
@user
.
save
if
@user
.
update_attributes
(
user_params
)
set_flash_message!
(
:notice
,
:confirmed
)
set_flash_message!
(
:notice
,
:confirmed
)
redirect_to
root_path
redirect_to
root_path
else
else
re
spond_with_navigational
(
resource
.
errors
,
status: :unprocessable_entity
){
render
:new
}
re
nder
'devise/confirmations/information'
,
resource:
@user
end
end
end
end
...
@@ -30,6 +30,6 @@ class ConfirmationsController < Devise::ConfirmationsController
...
@@ -30,6 +30,6 @@ class ConfirmationsController < Devise::ConfirmationsController
private
private
def
user_params
def
user_params
params
.
require
s
(
:user
).
permit
(
:email
,
:fullname
,
:password
,
:cd_name
)
params
.
require
(
:user
).
permit
(
:email
,
:fullname
,
:password
,
:cd_name
)
end
end
end
end
app/views/devise/confirmations/information.html.erb
View file @
2dd294bb
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<%=
f
.
label
:email
%>
<%=
f
.
label
:email
%>
<%=
f
.
email_field
:email
,
autofocus:
true
,
class:
'form-control'
%>
<%=
f
.
email_field
:email
,
autofocus:
true
,
readonly:
true
,
class:
'form-control'
%>
<%=
f
.
hidden_field
:id
%>
<%=
f
.
hidden_field
:id
%>
</div>
</div>
...
...
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