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
1
Merge Requests
1
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
Đường Sỹ Hoàng
VenJob
Commits
07fcf73b
Commit
07fcf73b
authored
Dec 24, 2019
by
Đường Sỹ Hoàng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed files
parent
4276fcb8
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
3 additions
and
23 deletions
+3
-23
app/assets/stylesheets/city.scss
+0
-3
app/assets/stylesheets/industries.scss
+0
-3
app/controllers/cities_controller.rb
+1
-1
app/models/city.rb
+2
-2
test/controllers/city_controller_test.rb
+0
-7
test/controllers/industries_controller_test.rb
+0
-7
No files found.
app/assets/stylesheets/city.scss
deleted
100644 → 0
View file @
4276fcb8
// Place all the styles related to the city controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: https://sass-lang.com/
app/assets/stylesheets/industries.scss
deleted
100644 → 0
View file @
4276fcb8
// Place all the styles related to the Industries controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: https://sass-lang.com/
app/controllers/cities_controller.rb
View file @
07fcf73b
...
@@ -2,5 +2,5 @@ class CitiesController < ApplicationController
...
@@ -2,5 +2,5 @@ class CitiesController < ApplicationController
def
index
def
index
@top_vn_cities
=
City
.
sort_top_vn_cities
@top_vn_cities
=
City
.
sort_top_vn_cities
@top_inter_cities
=
City
.
sort_top_inter_cities
@top_inter_cities
=
City
.
sort_top_inter_cities
end
@top_cities
=
City
.
sort_top_cities
end
end
app/models/city.rb
View file @
07fcf73b
...
@@ -7,11 +7,11 @@ class City < ApplicationRecord
...
@@ -7,11 +7,11 @@ class City < ApplicationRecord
end
end
def
self
.
sort_top_vn_cities
def
self
.
sort_top_vn_cities
@vn_cities
||=
City
.
where
(
region:
0
).
sort_by
(
&
:jobs_count
).
reject
{
|
city
|
city
.
jobs_count
.
zero?
}.
reverse
.
take
(
Settings
.
top
.
city
.
limit
)
@vn_cities
||=
where
(
region:
0
).
sort_by
(
&
:jobs_count
).
reject
{
|
city
|
city
.
jobs_count
.
zero?
}.
reverse
.
take
(
Settings
.
top
.
city
.
limit
)
end
end
def
self
.
sort_top_inter_cities
def
self
.
sort_top_inter_cities
@inter_cities
||=
City
.
where
(
region:
1
).
sort_by
(
&
:jobs_count
).
reject
{
|
city
|
city
.
jobs_count
.
zero?
}.
reverse
.
take
(
Settings
.
top
.
city
.
limit
)
@inter_cities
||=
where
(
region:
1
).
sort_by
(
&
:jobs_count
).
reject
{
|
city
|
city
.
jobs_count
.
zero?
}.
reverse
.
take
(
Settings
.
top
.
city
.
limit
)
end
end
def
jobs_count
def
jobs_count
...
...
test/controllers/city_controller_test.rb
deleted
100644 → 0
View file @
4276fcb8
require
'test_helper'
class
CityControllerTest
<
ActionDispatch
::
IntegrationTest
# test "the truth" do
# assert true
# end
end
test/controllers/industries_controller_test.rb
deleted
100644 → 0
View file @
4276fcb8
require
'test_helper'
class
IndustriesControllerTest
<
ActionDispatch
::
IntegrationTest
# test "the truth" do
# assert true
# end
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