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
Tô Ngọc Ánh
VeNJob
Commits
1f4b8912
Commit
1f4b8912
authored
Aug 03, 2020
by
Tô Ngọc Ánh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
id3 industries list
parent
7a3fadae
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
2 deletions
+18
-2
app/controllers/industries_controller.rb
+5
-0
app/views/home/index.html.erb
+2
-2
app/views/industries/_industry.html.erb
+2
-0
app/views/industries/index.html.erb
+8
-0
config/routes.rb
+1
-0
No files found.
app/controllers/industries_controller.rb
0 → 100644
View file @
1f4b8912
class
IndustriesController
<
ApplicationController
def
index
@industries
=
Industry
.
all
end
end
app/views/home/index.html.erb
View file @
1f4b8912
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<h1>
Top Industries
</h1>
<h1>
Top Industries
</h1>
<hr>
<hr>
<div
class=
'row'
>
<div
class=
'row'
>
<%=
render
partial:
'
home
/industry'
,
collection:
@top_industries
,
as: :industry
%>
<%=
render
partial:
'
industries
/industry'
,
collection:
@top_industries
,
as: :industry
%>
</div>
</div>
<a
href=
'
#
'
>
All Industries
</a>
<a
href=
'
<%=
industries_path
%>
'
>
All Industries
</a>
</div>
</div>
app/views/
home
/_industry.html.erb
→
app/views/
industries
/_industry.html.erb
View file @
1f4b8912
<%
if
industry
.
jobs
.
size
.
positive?
%>
<div
class=
'col-4 my-2'
>
<div
class=
'col-4 my-2'
>
<div
class=
'card'
>
<div
class=
'card'
>
<%=
link_to
'#'
,
class:
'card-body text-decoration-none'
do
%>
<%=
link_to
'#'
,
class:
'card-body text-decoration-none'
do
%>
...
@@ -6,3 +7,4 @@
...
@@ -6,3 +7,4 @@
<%
end
%>
<%
end
%>
</div>
</div>
</div>
</div>
<%
end
%>
app/views/industries/index.html.erb
0 → 100644
View file @
1f4b8912
<div
id=
'industries'
class=
'text-center my-3'
>
<h2>
Industries List
</h2>
<hr>
<div
class=
'row'
>
<%=
render
partial:
'industries/industry'
,
collection:
@industries
%>
</div>
</div>
\ No newline at end of file
config/routes.rb
View file @
1f4b8912
Rails
.
application
.
routes
.
draw
do
Rails
.
application
.
routes
.
draw
do
root
to:
'home#index'
root
to:
'home#index'
get
'cities'
,
to:
'locations#index'
get
'cities'
,
to:
'locations#index'
get
'industries'
,
to:
'industries#index'
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
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