Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
venjob_thanhnd
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
3
Merge Requests
3
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
thanhnd
venjob_thanhnd
Commits
b4e5943b
Commit
b4e5943b
authored
May 07, 2020
by
thanhnd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add username field to view sign up and update to database
parent
ff8a1b64
Pipeline
#604
failed with stages
in 0 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
1 deletions
+10
-1
app/controllers/application_controller.rb
+1
-1
app/views/devise/registrations/edit.html.erb
+4
-0
app/views/devise/registrations/new.html.erb
+4
-0
config/routes.rb
+1
-0
No files found.
app/controllers/application_controller.rb
View file @
b4e5943b
...
...
@@ -6,7 +6,7 @@ class ApplicationController < ActionController::Base
protected
def
configure_permitted_parameters
added_attrs
=
[
:
user
name
,
:email
,
:password
,
:password_confirmation
,
:remember_me
]
added_attrs
=
[
:name
,
:email
,
:password
,
:password_confirmation
,
:remember_me
]
devise_parameter_sanitizer
.
permit
:sign_up
,
keys:
added_attrs
devise_parameter_sanitizer
.
permit
:account_update
,
keys:
added_attrs
end
...
...
app/views/devise/registrations/edit.html.erb
View file @
b4e5943b
...
...
@@ -8,6 +8,10 @@
<%=
f
.
email_field
:email
,
autofocus:
true
,
autocomplete:
"email"
%>
</div>
<div>
<%=
f
.
label
:name
%>
<br
/>
<%=
f
.
text_field
:name
,
autofocus:
true
%>
</div>
<%
if
devise_mapping
.
confirmable?
&&
resource
.
pending_reconfirmation?
%>
<div>
Currently waiting confirmation for:
<%=
resource
.
unconfirmed_email
%>
</div>
<%
end
%>
...
...
app/views/devise/registrations/new.html.erb
View file @
b4e5943b
...
...
@@ -8,6 +8,10 @@
<%=
f
.
email_field
:email
,
autofocus:
true
,
autocomplete:
"email"
%>
</div>
<div>
<%=
f
.
label
:name
%>
<br
/>
<%=
f
.
text_field
:name
,
autofocus:
true
%>
</div>
<div
class=
"field"
>
<%=
f
.
label
:password
%>
<%
if
@minimum_password_length
%>
...
...
config/routes.rb
View file @
b4e5943b
...
...
@@ -7,6 +7,7 @@ Rails.application.routes.draw do
as
:user
do
get
"signin"
=>
"devise/sessions#new"
post
"signin"
=>
"devise/sessions#create"
get
'/users/sign_out'
=>
'devise/sessions#destroy'
delete
"signout"
=>
"devise/sessions#destroy"
end
...
...
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