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
0
Merge Requests
0
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
Nguyen Ngoc Nghia
VeNJOB
Commits
56d05385
Commit
56d05385
authored
Dec 13, 2019
by
nnnghia98
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit controllers name
parent
ae84c4c6
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
7 additions
and
6 deletions
+7
-6
app/controllers/tops_controller.rb
+1
-1
app/models/city.rb
+3
-1
app/views/cities/_city.html.erb
+1
-2
app/views/top/favorite.html.erb
+0
-0
app/views/top/history.html.erb
+0
-0
app/views/top/index.html.erb
+0
-0
config/routes.rb
+2
-2
No files found.
app/controllers/
static_page
s_controller.rb
→
app/controllers/
top
s_controller.rb
View file @
56d05385
class
StaticPage
sController
<
ApplicationController
class
Top
sController
<
ApplicationController
def
index
@vn_cities
=
City
.
vn_cities
@industries
=
Industry
.
all
...
...
app/models/city.rb
View file @
56d05385
...
...
@@ -17,6 +17,8 @@ class City < ApplicationRecord
has_many
:city_jobs
has_many
:jobs
,
through: :city_jobs
scope
:vn_cities
,
->
{
where
region:
"Việt Nam"
}
scope
:vn_cities
,
->
{
where
region:
"Việt Nam"
}
do
where
(
name:
"16"
)
puts
"Other"
end
scope
:inter_cities
,
->
{
where
region:
"#"
}
end
app/views/cities/_city.html.erb
View file @
56d05385
<div
class=
"col-md-3"
>
<div
class=
"col-show"
>
<%=
city
.
name
%>
<%=
(
city
.
jobs
.
count
)
%>
<%=
city
.
name
%>
(
<%=
(
city
.
jobs
.
count
)
%>
)
</div>
</div>
app/views/
static_pages
/favorite.html.erb
→
app/views/
top
/favorite.html.erb
View file @
56d05385
File moved
app/views/
static_pages
/history.html.erb
→
app/views/
top
/history.html.erb
View file @
56d05385
File moved
app/views/
static_pages
/index.html.erb
→
app/views/
top
/index.html.erb
View file @
56d05385
File moved
config/routes.rb
View file @
56d05385
...
...
@@ -4,8 +4,8 @@ Rails.application.routes.draw do
resources
:cities
,
only: :index
resources
:jobs
,
only: :index
devise_for
:users
root
"
static_page
s#index"
get
"
static_page
s/index"
root
"
top
s#index"
get
"
top
s/index"
namespace
:users
do
resource
:my_page
,
only: :show
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