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
8829b3b6
Commit
8829b3b6
authored
Aug 26, 2021
by
Nguyen Hoang Mai Phuong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix style code
parent
6f1d6333
Pipeline
#1404
failed with stages
in 0 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
app/controllers/users/confirmations_controller.rb
+1
-1
app/models/apply_job.rb
+1
-1
app/models/user.rb
+3
-2
No files found.
app/controllers/users/confirmations_controller.rb
View file @
8829b3b6
...
@@ -26,6 +26,6 @@ class Users::ConfirmationsController < Devise::ConfirmationsController
...
@@ -26,6 +26,6 @@ class Users::ConfirmationsController < Devise::ConfirmationsController
# The path used after confirmation.
# The path used after confirmation.
def
after_confirmation_path_for
(
resource_name
,
resource
)
def
after_confirmation_path_for
(
resource_name
,
resource
)
sign_in
(
resource
)
sign_in
(
resource
)
root
_path
my
_path
end
end
end
end
app/models/apply_job.rb
View file @
8829b3b6
...
@@ -3,7 +3,7 @@ class ApplyJob < ApplicationRecord
...
@@ -3,7 +3,7 @@ class ApplyJob < ApplicationRecord
belongs_to
:job
belongs_to
:job
has_one_attached
:cv
has_one_attached
:cv
validates
:name
,
presence:
true
,
length:
{
maximum:
200
}
validates
:name
,
presence:
true
,
length:
{
maximum:
200
}
VALID_FILE_UPLOAD
=
%w[application/msword application/pdf application/xls application/xlsx application/zip]
VALID_FILE_UPLOAD
=
%w[application/msword application/pdf application/xls application/xlsx application/zip]
.
freeze
VALID_EMAIL_REGEX
=
/\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
VALID_EMAIL_REGEX
=
/\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
validates
:email
,
presence:
true
,
length:
{
maximum:
255
},
format:
{
with:
VALID_EMAIL_REGEX
}
validates
:email
,
presence:
true
,
length:
{
maximum:
255
},
format:
{
with:
VALID_EMAIL_REGEX
}
validates
:cv
,
presence:
true
,
content_type:
{
in:
VALID_FILE_UPLOAD
,
message:
'must be a valid pdf format'
},
validates
:cv
,
presence:
true
,
content_type:
{
in:
VALID_FILE_UPLOAD
,
message:
'must be a valid pdf format'
},
...
...
app/models/user.rb
View file @
8829b3b6
...
@@ -3,12 +3,12 @@ class User < ApplicationRecord
...
@@ -3,12 +3,12 @@ class User < ApplicationRecord
has_many
:apply_jobs
,
dependent: :destroy
has_many
:apply_jobs
,
dependent: :destroy
has_many
:favorite_jobs
,
dependent: :destroy
has_many
:favorite_jobs
,
dependent: :destroy
has_many
:history_jobs
,
dependent: :destroy
has_many
:history_jobs
,
dependent: :destroy
VALID_FILE_UPLOAD
=
%w[application/msword application/pdf application/xls application/xlsx application/zip]
VALID_FILE_UPLOAD
=
%w[application/msword application/pdf application/xls application/xlsx application/zip]
.
freeze
devise
:database_authenticatable
,
:registerable
,
devise
:database_authenticatable
,
:registerable
,
:recoverable
,
:rememberable
,
:trackable
,
:validatable
,
:recoverable
,
:rememberable
,
:trackable
,
:validatable
,
:confirmable
:confirmable
validates
:name
,
length:
{
maximum:
200
}
validates
:name
,
length:
{
maximum:
200
}
validates
:email
,
length:
{
maximum:
200
},
uniqueness:
true
validates
:email
,
length:
{
maximum:
200
},
uniqueness:
true
validates
:cv
,
content_type:
{
in:
VALID_FILE_UPLOAD
,
message:
'must be msword, pdf, xls, xlsx, zip format'
},
validates
:cv
,
content_type:
{
in:
VALID_FILE_UPLOAD
,
message:
'must be msword, pdf, xls, xlsx, zip format'
},
size:
{
less_than:
5
.
megabytes
,
message:
'should be less than 5MB'
}
size:
{
less_than:
5
.
megabytes
,
message:
'should be less than 5MB'
}
end
end
\ No newline at end of file
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