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
c70037cd
Commit
c70037cd
authored
Jul 20, 2017
by
Thanh Hung Pham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change nil? to blank?
parent
904865d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
app/controllers/jobs_controller.rb
+3
-3
No files found.
app/controllers/jobs_controller.rb
View file @
c70037cd
...
...
@@ -29,20 +29,20 @@ class JobsController < ApplicationController
end
def
show
unless
params
[
:city_id
].
nil
?
unless
params
[
:city_id
].
blank
?
@job_count
=
Job
.
where
(
city_id:
params
[
:city_id
]).
count
@jobs
=
Job
.
where
(
city_id:
params
[
:city_id
]).
page
params
[
:page
]
@search_conditions
=
"All jobs in
#{
City
.
find
(
params
[
:city_id
]).
name
}
"
end
unless
params
[
:category_id
].
nil
?
unless
params
[
:category_id
].
blank
?
@job_ids
=
JobCategory
.
where
(
category_id:
params
[
:category_id
]).
select
(
:job_id
)
@job_count
=
Job
.
where
(
id:
@job_ids
).
count
@jobs
=
Job
.
where
(
id:
@job_ids
).
page
params
[
:page
]
@search_conditions
=
"All jobs in
#{
Category
.
find
(
params
[
:category_id
]).
name
}
"
end
unless
params
[
:company_id
].
nil
?
unless
params
[
:company_id
].
blank
?
@job_count
=
Job
.
where
(
company_id:
params
[
:company_id
]).
count
@jobs
=
Job
.
where
(
company_id:
params
[
:company_id
]).
page
params
[
:page
]
@search_conditions
=
"All jobs in
#{
Company
.
find
(
params
[
:company_id
]).
name
}
"
...
...
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