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
4cf18b19
Commit
4cf18b19
authored
Jul 20, 2017
by
Thanh Hung Pham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove code
parent
4593eb77
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
10 deletions
+0
-10
app/models/apply.rb
+0
-10
No files found.
app/models/apply.rb
View file @
4cf18b19
...
@@ -9,16 +9,6 @@ class Apply < ApplicationRecord
...
@@ -9,16 +9,6 @@ class Apply < ApplicationRecord
scope
:search_city
,
->
(
city_id
)
{
joins
(
:job
).
where
(
'? IS NULL OR jobs.city_id = ?'
,
city_id
,
city_id
)
}
scope
:search_city
,
->
(
city_id
)
{
joins
(
:job
).
where
(
'? IS NULL OR jobs.city_id = ?'
,
city_id
,
city_id
)
}
scope
:search_category
,
->
(
category_id
)
{
joins
(
job:
[
:job_category
]).
where
(
'? IS NULL OR job_categories.category_id = ?'
,
category_id
,
category_id
)
}
scope
:search_category
,
->
(
category_id
)
{
joins
(
job:
[
:job_category
]).
where
(
'? IS NULL OR job_categories.category_id = ?'
,
category_id
,
category_id
)
}
def
self
.
to_csv
(
options
=
{})
CSV
.
generate
(
options
)
do
|
csv
|
csv
.
add_row
column_names
all
.
each
do
|
apply
|
values
=
apply
.
attributes
.
values
csv
.
add_row
values
end
end
end
def
self
.
to_csv
(
apply_attributes
=
column_names
,
job_attributes
=
job
.
column_names
,
user_attributes
=
user
.
column_names
,
options
=
{})
def
self
.
to_csv
(
apply_attributes
=
column_names
,
job_attributes
=
job
.
column_names
,
user_attributes
=
user
.
column_names
,
options
=
{})
CSV
.
generate
(
options
)
do
|
csv
|
CSV
.
generate
(
options
)
do
|
csv
|
csv
.
add_row
apply_attributes
+
job_attributes
+
user_attributes
csv
.
add_row
apply_attributes
+
job_attributes
+
user_attributes
...
...
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