page ID4
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
-
8 8 gem 'bootstrap', '~> 5.0.1' 9 9 gem 'nokogiri', '~> 1.11', '>= 1.11.7' 10 10 gem 'slim-rails' 11 gem 'kaminari', '~> 1.2', '>= 1.2.1', :git => 'https://github.com/kaminari/kaminari' -
Master
@phuongnhm Sao phải giới hạn version vậy em? Cần để cái này không
:git => 'https://github.com/kaminari/kaminari'không? -
-
-
-
3 3 @cities_vietnam = City.cities_by_region(City::REGION_VN_ID) 4 4 @cities_international = City.cities_by_region(City::REGION_INTERNATIONAL_ID) 5 5 end 6 7 def show -
MasterEdited by Thanh Hung Pham
@phuongnhm Task này
ID4 - Job ListNên để action bênJobsControllernha em. -
-
-
2 2 def list_industry 3 3 @industry_list = Industry.industry_list 4 4 end 5 6 def show -
Master
@phuongnhm Tương tự cái này nên để bên
JobsControllernha em -
-
-
app/controllers/jobs_controller.rb 0 → 100644
1 class JobsController < ApplicationController 2 def search -
Master
@phuongnhm Chức năng này tạm thời chưa làm. Nên em xóa cũng được nha
-
-
-
app/helpers/jobs_helper.rb 0 → 100644
1 module JobsHelper -
Master
@phuongnhm File này không dùng xóa đi em
-
-
-
7 7 REGION_INTERNATIONAL_ID = 2 8 8 scope :top_cities, -> { joins(:jobs).group(:name).order('count_all DESC').count.take(LATEST_CITY_NUMBER) } 9 9 scope :cities_by_region, ->(value) { joins(:jobs).group(:name).having('count_all >= ?', 1).where('region_id = ?', value).order('count_all DESC').count } 10 extend FriendlyId -
Master
@phuongnhm Extend thường để sau define class
class A extend B end -
Master
@phuongnhm Chỗ này chưa sửa nè em
-
-
-
app/views/city/show.html.slim 0 → 100644
1 - provide :title, 'Jobs' -
Master
@phuongnhm Tương tự action, phần view này nên để bên Views
jobs -
-
-
app/views/industry/show.html.slim 0 → 100644
1 - provide :title, 'Jobs' -
Master
@phuongnhm Tương tự action, phần view này nên để bên Views
jobs -
-
-
-
-
-
14 14 .row.my-3.text-center.fs-5 15 15 - @cities_vietnam.each do |name, amount| 16 16 .col-3.p-2.border.mb-1.fw-normal.bg-white 17 = link_to name, "#" 17 = link_to name, city_slug_path(City.find_by(name: name)) -
MasterEdited by Thanh Hung Pham
@phuongnhm Không được query DB ở trong Views nha em.
- Mình có thể dùng trực tiếp
city_slug_path(slug) - Tương tự bên Industry nha em
- Mình có thể dùng trực tiếp
-
-
-
app/views/jobs/_search.html.slim 0 → 100644
1 .search.p-3.offset-md-2 2 = form_with(url: '/search', method: 'get', local: true) do -
Master
@phuongnhm Dư 1 space cuối line
-
-
-
app/views/jobs/_search.html.slim 0 → 100644
1 .search.p-3.offset-md-2 2 = form_with(url: '/search', method: 'get', local: true) do 3 = text_field_tag :search, params[:search], placeholder: "Search", class: "form" 4 = submit_tag "Search", name: nil, class: 'btn-primary' 5 -
Master
@phuongnhm Dư nhiều dòng trống chỗ này
-
-
-
-
-
-
-
-
-
app/views/jobs/show.html.slim 0 → 100644
1 - provide :title, 'Job List' 2 3 = render 'search' 4 .container 5 h5.fw-normal 6 | Total: -
Master
@phuongnhm @phuongnhm Chưa có giá trị hả em?
- Total: bao nhiêu job?
- Result for: điều kiện gì nữa chứ?
Ví dụ:
Total: 4 jobs Result for: Hồ Chí Minh -
-
-
-
-
merged
Toggle commit list