Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
venjob_nth
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
3
Merge Requests
3
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ô Trung Hưng
venjob_nth
Commits
5bc09eea
Commit
5bc09eea
authored
Aug 03, 2020
by
Ngô Trung Hưng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix index top page
parent
67a53af5
Pipeline
#760
failed with stages
in 0 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
app/controllers/home_controller.rb
+2
-2
app/models/city.rb
+1
-0
config/puma.rb
+1
-1
No files found.
app/controllers/home_controller.rb
View file @
5bc09eea
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
class
HomeController
<
ApplicationController
class
HomeController
<
ApplicationController
def
index
def
index
@industries
=
Industry
.
order
(
name: :asc
).
all
@industries
=
Industry
.
order
(
name: :asc
).
all
@job_count
=
Job
.
all
.
count
@job_count
=
Job
.
count
@cities
=
City
.
all
@cities
=
City
.
all
_cities
@lasted_jobs
=
Job
.
order
(
created_at: :desc
).
limit
(
Job
::
NUMBER_LASTED_JOB
)
@lasted_jobs
=
Job
.
order
(
created_at: :desc
).
limit
(
Job
::
NUMBER_LASTED_JOB
)
@top_cities
=
City
.
top_hot
.
take
(
9
)
@top_cities
=
City
.
top_hot
.
take
(
9
)
@top_industries
=
Industry
.
top_hot
.
take
(
9
)
@top_industries
=
Industry
.
top_hot
.
take
(
9
)
...
...
app/models/city.rb
View file @
5bc09eea
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
class
City
<
ApplicationRecord
class
City
<
ApplicationRecord
has_many
:city_jobs
has_many
:city_jobs
has_many
:jobs
,
through: :city_jobs
has_many
:jobs
,
through: :city_jobs
scope
:all_cities
,
->
{
select
:id
,
:name
}
def
self
.
top_hot
def
self
.
top_hot
hash
=
{}
hash
=
{}
...
...
config/puma.rb
View file @
5bc09eea
...
@@ -9,7 +9,7 @@ threads threads_count, threads_count
...
@@ -9,7 +9,7 @@ threads threads_count, threads_count
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
#
#
port
ENV
.
fetch
(
"PORT"
)
{
3000
}
port
ENV
.
fetch
(
"PORT"
)
{
1234
}
# Specifies the `environment` that Puma will run in.
# Specifies the `environment` that Puma will run in.
#
#
...
...
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