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
60fdeba5
Commit
60fdeba5
authored
Jul 19, 2017
by
Thanh Hung Pham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scope search date
parent
b94c4478
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
app/controllers/admins_controller.rb
+3
-3
app/models/apply.rb
+2
-0
No files found.
app/controllers/admins_controller.rb
View file @
60fdeba5
...
...
@@ -7,9 +7,9 @@ class AdminsController < ApplicationController
@city_id
=
params
[
:city_id
]
if
params
[
:city_id
].
present?
@category_id
=
params
[
:category_id
]
if
params
[
:category_id
].
present?
@from_date_default
=
Date
.
new
(
params
[
:from_date
][
'(1i)'
].
to_i
,
params
[
:from_date
][
'(2i)'
].
to_i
,
params
[
:from_date
][
'(3i)'
].
to_i
)
@to_date_default
=
Date
.
new
(
params
[
:to_date
][
'(1i)'
].
to_i
,
params
[
:to_date
][
'(2i)'
].
to_i
,
params
[
:to_date
][
'(3i)'
].
to_i
)
@from_date_default
=
Date
.
new
(
params
[
:from_date
][
'(1i)'
].
to_i
,
params
[
:from_date
][
'(2i)'
].
to_i
,
params
[
:from_date
][
'(3i)'
].
to_i
)
if
params
[
:from_date
].
present?
@to_date_default
=
Date
.
new
(
params
[
:to_date
][
'(1i)'
].
to_i
,
params
[
:to_date
][
'(2i)'
].
to_i
,
params
[
:to_date
][
'(3i)'
].
to_i
)
if
params
[
:to_date
].
present?
@applied_jobs
=
Apply
.
a
ll
.
page
params
[
:page
]
@applied_jobs
=
Apply
.
a
pplied_at_between
(
@from_date_default
,
@to_date_default
)
.
page
params
[
:page
]
end
end
app/models/apply.rb
View file @
60fdeba5
...
...
@@ -3,4 +3,6 @@ class Apply < ApplicationRecord
belongs_to
:job
paginates_per
20
scope
:applied_at_between
,
->
(
from_date
,
to_date
)
{
where
(
'applied_at >= ? AND applied_at <= ?'
,
from_date
,
to_date
)
}
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