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 Hoang Mai Phuong
VeNJOB
Commits
6f1d6333
Commit
6f1d6333
authored
Aug 26, 2021
by
Nguyen Hoang Mai Phuong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix routes
parent
823bc0ff
Pipeline
#1403
canceled with stages
in 0 seconds
Changes
6
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
17 deletions
+12
-17
app/controllers/apply_jobs_controller.rb
+2
-0
app/controllers/users/registrations_controller.rb
+1
-1
app/views/users/passwords/edit.html.slim
+0
-8
app/views/users/registrations/edit.html.slim
+2
-1
app/views/users/registrations/new.html.slim
+2
-1
config/routes.rb
+5
-6
No files found.
app/controllers/apply_jobs_controller.rb
View file @
6f1d6333
class
ApplyJobsController
<
ApplicationController
include
ApplicationHelper
before_action
:authenticate_user!
def
new
job
=
Job
.
find_by
(
id:
params
[
:job_id
])
or
not_found
...
...
app/controllers/users/registrations_controller.rb
View file @
6f1d6333
...
...
@@ -56,7 +56,7 @@ class Users::RegistrationsController < Devise::RegistrationsController
# end
def
after_update_path_for
(
resource
)
my_path
(
resource
)
my_path
end
# The path used after sign up for inactive accounts.
...
...
app/views/users/passwords/edit.html.slim
View file @
6f1d6333
...
...
@@ -8,14 +8,6 @@ h2.p-3.text-center
.card-body
=
f
.
hidden_field
:reset_password_token
.field
=
f
.
label
:email
br
=
f
.
email_field
:email
,
disabled:
true
,
autofocus:
true
,
autocomplete:
"email"
,
class:
'form-control'
-
if
devise_mapping
.
confirmable?
&&
resource
.
pending_reconfirmation?
div
|
Currently waiting confirmation for:
=
resource
.
unconfirmed_email
.field
=
f
.
label
:password
,
"New password"
br
-
if
@minimum_password_length
...
...
app/views/users/registrations/edit.html.slim
View file @
6f1d6333
...
...
@@ -41,6 +41,6 @@ h2.p-3.text-center
.field
=
f
.
label
:cv
,
"CV"
br
=
f
.
file_field
:cv
,
accept:
User
::
VALID_FILE_UPLOAD
,
size:
{
less_than:
5
.
megabytes
,
message
:"should be less than 5MB"
}
=
f
.
file_field
:cv
,
accept:
User
::
VALID_FILE_UPLOAD
,
size:
{
less_than:
5
.
megabytes
,
message
:"should be less than 5MB"
}
.actions.p-2.text-center
=
f
.
submit
"Update"
,
class:
"btn btn-primary"
\ No newline at end of file
app/views/users/registrations/new.html.slim
View file @
6f1d6333
...
...
@@ -30,6 +30,6 @@ h2.p-3.text-center
.field
=
f
.
label
:cv
,
"CV"
br
=
f
.
file_field
:cv
,
accept:
"application/pdf"
,
size:
{
less_than:
5
.
megabytes
,
message
:"should be less than 5MB"
}
=
f
.
file_field
:cv
,
accept:
User
::
VALID_FILE_UPLOAD
,
size:
{
less_than:
5
.
megabytes
,
message
:"should be less than 5MB"
}
.actions.p-3.text-center
=
f
.
submit
"Sign up"
,
class:
"btn btn-primary"
\ No newline at end of file
config/routes.rb
View file @
6f1d6333
...
...
@@ -8,20 +8,19 @@ Rails.application.routes.draw do
get
'apply'
,
to:
'apply_jobs#new'
post
'confirm'
,
to:
'apply_jobs#confirm'
post
'done'
,
to:
'apply_jobs#done'
devise_for
:users
,
controllers:
{
registrations:
'users/registrations'
,
confirmations:
'users/confirmations'
,
passwords:
'users/passwords'
,
sessions:
'users/sessions'
},
skip:
%i[sessions registrations passwords]
resources
:user
devise_for
:users
,
skip:
%i[sessions registrations passwords]
,
controllers:
{
confirmations:
'users/confirmations'
}
resources
:users
,
only: :show
get
'/my'
,
to:
'users#show'
devise_scope
:user
do
get
'register/1'
,
to:
'users/registrations#new'
,
as: :new_user_registration
get
'register/2'
,
to:
'users/registrations#show'
get
'my/info'
,
to:
'users/registrations#edit'
,
as: :edit_user_registration
match
'/my'
,
to:
'
devise
/registrations#create'
,
as: :user_registration
,
via:
[
:post
]
match
'/my'
,
to:
'
devise
/registrations#update'
,
via:
%i[put patch]
match
'/my'
,
to:
'
users
/registrations#create'
,
as: :user_registration
,
via:
[
:post
]
match
'/my'
,
to:
'
users
/registrations#update'
,
via:
%i[put patch]
get
'forgot_password'
,
to:
'users/passwords#new'
,
as: :new_user_password
get
'reset_password'
,
to:
'users/passwords#edit'
,
as: :edit_user_password
match
'reset_password'
,
to:
'users/passwords#update'
,
via:
%i[put patch]
match
'reset_password'
,
to:
'users/passwords#create'
,
as: :user_password
,
via:
[
:post
]
post
'reset_password'
,
to:
'users/passwords#create'
,
as: :user_password
get
'login'
,
to:
'users/sessions#new'
,
as: :new_user_session
post
'login'
,
to:
'users/sessions#create'
,
as: :user_session
delete
'logout'
,
to:
'users/sessions#destroy'
,
as: :destroy_user_session
,
via:
Devise
.
mappings
[
:user
].
sign_out_via
...
...
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