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
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xuan Trung Le
venjob
Commits
ed04862b
Commit
ed04862b
authored
Nov 13, 2017
by
Xuan Trung Le
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fig bugs
parent
56235b4b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
6 deletions
+9
-6
app/controllers/admins/applies_controller.rb
+1
-1
app/models/apply_job.rb
+3
-0
app/views/admins/applies/_application.html.erb
+4
-2
app/views/admins/applies/index.html.erb
+1
-3
No files found.
app/controllers/admins/applies_controller.rb
View file @
ed04862b
class
Admins
::
AppliesController
<
ApplicationController
def
index
@cities
=
City
.
pluck
(
:id
,
:name
)
@applications
=
ApplyJob
.
applications
.
includes
(
:job
,
:user
)
@applications
=
ApplyJob
.
includes
(
:job
,
:user
)
end
end
app/models/apply_job.rb
View file @
ed04862b
...
...
@@ -4,7 +4,10 @@ class ApplyJob < ApplicationRecord
validates_size_of
:cv
,
maximum:
5
.
megabytes
,
message:
'size should be less than 5MB'
validates
:email
,
presence:
true
validates
:name
,
presence:
true
<<<<<<<
132
d97c26c67214fbdb21f17fdf70e66ae6c833b
# CarrierWave
mount_uploader
:cv
,
CvUploader
=======
>>>>>>>
fig
bugs
end
app/views/admins/applies/_application.html.erb
View file @
ed04862b
<div
class=
"job-intro well mr0 mrBot20"
>
<%
@applications
.
each
do
|
application
|
%>
<div
class=
"job-intro well mr0 mrBot20"
>
<h4
class=
"mr0"
>
<%=
link_to
application
.
job
.
name
,
job_path
(
application
.
job
)
%>
</h4>
<p>
<%=
"Candidate Name:
#{
application
.
user
.
name
}
"
%>
</p>
<p>
<%=
"Candidate CV:
#{
application
.
user
.
cv
}
"
%>
</p>
...
...
@@ -6,4 +7,5 @@
<span>
<%=
"Candidate Email:
#{
application
.
user
.
email
}
"
%>
</span>
<span
class=
"navbar-right"
>
<%=
"Applied at:
#{
application
.
created_at
.
strftime
(
'%m/%d/%y'
)
}
"
%>
</span>
</p>
</div>
</div>
<%
end
%>
app/views/admins/applies/index.html.erb
View file @
ed04862b
...
...
@@ -36,9 +36,7 @@
<div
class=
"col-md-12 jobs"
>
<div
class=
"panel border_bot clearfix"
>
<%
@applications
.
each
do
|
application
|
%>
<%=
render
"admins/applies/application"
,
application:
application
%>
<%
end
%>
<%=
render
"admins/applies/application"
,
applications:
@application
%>
</div>
</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