Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
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
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Mai Hoang Thai Ha
  • VenJob
  • Merge Requests
  • !10

Merged
Opened Jul 21, 2021 by Mai Hoang Thai Ha@hamht 
  • Report abuse
Report abuse

Task/10 create job list page id4

From Task/10_create_job_list_page_ID4 into master

×

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b Task/10_create_job_list_page_ID4 origin/Task/10_create_job_list_page_ID4

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git checkout master
git merge --no-ff Task/10_create_job_list_page_ID4

Step 4. Push the result of the merge to GitLab

git push origin master

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

  • Discussion 49
  • Commits 28
  • Changes 39
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • 49e65316 - add slug to industries and cities

    Compare with previous version

    Jul 22, 2021

    added 1 commit

    • 49e65316 - add slug to industries and cities

    Compare with previous version

    added 1 commit * 49e65316 - add slug to industries and cities [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5348&start_sha=0442a3fc097bcee7f0eb9c58a08ea03290103833)
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • 88541d79 - add show job, breadcump

    Compare with previous version

    Jul 22, 2021

    added 1 commit

    • 88541d79 - add show job, breadcump

    Compare with previous version

    added 1 commit * 88541d79 - add show job, breadcump [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5349&start_sha=49e65316d9f6a6d1baf0ac3627cd9b09d91363c2)
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • 0aa1e580 - add job details

    Compare with previous version

    Jul 26, 2021

    added 1 commit

    • 0aa1e580 - add job details

    Compare with previous version

    added 1 commit * 0aa1e580 - add job details [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5357&start_sha=88541d79b2b306d570d18a0739d16274c94f23a3)
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • 0114316b - none fix

    Compare with previous version

    Jul 27, 2021

    added 1 commit

    • 0114316b - none fix

    Compare with previous version

    added 1 commit * 0114316b - none fix [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5362&start_sha=0aa1e5807e4f07a239bd456466dedc30d6e1619b)
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • 6fa1254d - add job details

    Compare with previous version

    Jul 27, 2021

    added 1 commit

    • 6fa1254d - add job details

    Compare with previous version

    added 1 commit * 6fa1254d - add job details [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5368&start_sha=0114316b149efc4d7ddc478f95c25970c961aa14)
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • 39711e75 - initialize method to_slug, used scope and class method

    Compare with previous version

    Jul 28, 2021

    added 1 commit

    • 39711e75 - initialize method to_slug, used scope and class method

    Compare with previous version

    added 1 commit * 39711e75 - initialize method to_slug, used scope and class method [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5377&start_sha=6fa1254d2a187387ae41af6735eeb52185dacd7e)
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • 98d6bf79 - add link to job

    Compare with previous version

    Jul 29, 2021

    added 1 commit

    • 98d6bf79 - add link to job

    Compare with previous version

    added 1 commit * 98d6bf79 - add link to job [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5379&start_sha=39711e75dc93a43a67ad5d0050f3dd168555194b)
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    added 13 commits

    • 98d6bf79...d71790ab - 12 commits from branch master
    • 4aa82d16 - Merge branch 'master' into 'Task/10_create_job_list_page_ID4'

    Compare with previous version

    Aug 08, 2021

    added 13 commits

    • 98d6bf79...d71790ab - 12 commits from branch master
    • 4aa82d16 - Merge branch 'master' into 'Task/10_create_job_list_page_ID4'

    Compare with previous version

    added 13 commits * 98d6bf79...d71790ab - 12 commits from branch `master` * 4aa82d16 - Merge branch 'master' into 'Task/10_create_job_list_page_ID4' [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5389&start_sha=98d6bf79db27572c656e43ef7528ac2e34698682)
    Toggle commit list
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 08, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/models/job.rb
    1 1 class Job < ApplicationRecord
    2 scope :latest, -> { order(updated_at: :desc).limit(5).joins(:cities).includes(:company, :cities, :cities_jobs) }
    • phuctmZigexn @phuctm commented Aug 08, 2021
      Master

      tạo 1 constant cho limit, ví dụ:

      LATEST_JOBS_LIMIT = 5
      def self.latest
          joins(:cities).includes(:cities, :cities_jobs, :company).order(created_at: :desc).limit(LATEST_JOBS_LIMIT)
        end
      tạo 1 constant cho limit, ví dụ: ``` LATEST_JOBS_LIMIT = 5 def self.latest joins(:cities).includes(:cities, :cities_jobs, :company).order(created_at: :desc).limit(LATEST_JOBS_LIMIT) end ```
    • Mai Hoang Thai Ha @hamht

      changed this line in version 11 of the diff

      Aug 09, 2021

      changed this line in version 11 of the diff

      changed this line in [version 11 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5391&start_sha=4aa82d16a9bc6f293cb857ded45b2beec7aca14d#742abd5cbc2b12d2da315862ace6297c7d6dcb87_2_2)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 08, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/models/city.rb
    2 scope :jobs_count, -> { joins(:jobs).group(:region).count }
    3
    2 4 has_and_belongs_to_many :jobs
    3 5 enum region: { vietnam: 0, international: 1 }
    6
    7 validates :slug, presence: true, uniqueness: { case_sensitive: true }
    8
    9 def to_params
    10 slug
    11 end
    12
    13 def add_slugs
    14 update slug: to_slug(name)
    15 end
    16
    17 def self.top_jobs
    • phuctmZigexn @phuctm commented Aug 08, 2021
      Master

      sử dụng tối đa activerecord để lấy data thay vì sử dụng methods của ruby

      TOP_JOB_COUNT = 9
      def self.top_jobs
            joins(:jobs).select('cities.*, count(jobs.id) as job_count')
                        .group('cities.id').order('job_count desc').limit(TOP_JOB_COUNT)
          end
      sử dụng tối đa activerecord để lấy data thay vì sử dụng methods của ruby ``` TOP_JOB_COUNT = 9 def self.top_jobs joins(:jobs).select('cities.*, count(jobs.id) as job_count') .group('cities.id').order('job_count desc').limit(TOP_JOB_COUNT) end ```
    • Mai Hoang Thai Ha @hamht

      changed this line in version 11 of the diff

      Aug 09, 2021

      changed this line in version 11 of the diff

      changed this line in [version 11 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5391&start_sha=4aa82d16a9bc6f293cb857ded45b2beec7aca14d#28495972e963898abf2919ffeaeb92fbdf49fb8e_17_15)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 08, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/models/city.rb
    1 1 class City < ApplicationRecord
    2 scope :jobs_count, -> { joins(:jobs).group(:region).count }
    • phuctmZigexn @phuctm commented Aug 08, 2021
      Master

      sắp xếp thứ tự các thành phần trong model

      ref: https://github.com/rubocop/rails-style-guide#macro-style-methods

      sắp xếp thứ tự các thành phần trong model ref: https://github.com/rubocop/rails-style-guide#macro-style-methods
    • Mai Hoang Thai Ha @hamht

      changed this line in version 11 of the diff

      Aug 09, 2021

      changed this line in version 11 of the diff

      changed this line in [version 11 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5391&start_sha=4aa82d16a9bc6f293cb857ded45b2beec7aca14d#28495972e963898abf2919ffeaeb92fbdf49fb8e_2_2)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 08, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/models/city.rb
    1 1 class City < ApplicationRecord
    2 scope :jobs_count, -> { joins(:jobs).group(:region).count }
    3
    2 4 has_and_belongs_to_many :jobs
    3 5 enum region: { vietnam: 0, international: 1 }
    6
    7 validates :slug, presence: true, uniqueness: { case_sensitive: true }
    8
    9 def to_params
    • phuctmZigexn @phuctm commented Aug 08, 2021
      Master
      def to_params
          slug
        end
      
        def add_slugs
          update slug: to_slug(name)
        end
      

      không sử dụng => xóa nó luôn

      ``` def to_params slug end def add_slugs update slug: to_slug(name) end ``` không sử dụng => xóa nó luôn
    • Mai Hoang Thai Ha @hamht

      changed this line in version 11 of the diff

      Aug 09, 2021

      changed this line in version 11 of the diff

      changed this line in [version 11 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5391&start_sha=4aa82d16a9bc6f293cb857ded45b2beec7aca14d#28495972e963898abf2919ffeaeb92fbdf49fb8e_9_8)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 08, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/models/industry.rb
    3
    2 4 has_and_belongs_to_many :jobs
    5
    6 validates :slug, presence: true, uniqueness: { case_sensitive: true }
    7
    8 # before_validation :add_slugs
    9
    10 def to_params
    11 slug
    12 end
    13
    14 def add_slugs
    15 update slug: to_slug(name)
    16 end
    17
    18 def self.top_jobs
    • phuctmZigexn @phuctm commented Aug 08, 2021
      Master

      sửa lại tương tự với bên model City.

      sửa lại tương tự với bên model City.
    • Mai Hoang Thai Ha @hamht

      changed this line in version 11 of the diff

      Aug 09, 2021

      changed this line in version 11 of the diff

      changed this line in [version 11 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5391&start_sha=4aa82d16a9bc6f293cb857ded45b2beec7aca14d#6fd7ec4bda80a3376d591b3e766bce8bf035c4c6_18_15)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 08, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/models/industry.rb
    1 1 class Industry < ApplicationRecord
    2 scope :jobs_count, -> { joins(:jobs).group(:name).count.sort_by(&:first) }
    3
    2 4 has_and_belongs_to_many :jobs
    5
    6 validates :slug, presence: true, uniqueness: { case_sensitive: true }
    7
    8 # before_validation :add_slugs
    • phuctmZigexn @phuctm commented Aug 08, 2021
      Master
      # before_validation :add_slugs
      
        def to_params
          slug
        end
      
        def add_slugs
          update slug: to_slug(name)
        end
      

      xóa code nếu không sử dụng

      ``` # before_validation :add_slugs def to_params slug end def add_slugs update slug: to_slug(name) end ``` xóa code nếu không sử dụng
    • Mai Hoang Thai Ha @hamht

      changed this line in version 11 of the diff

      Aug 09, 2021

      changed this line in version 11 of the diff

      changed this line in [version 11 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5391&start_sha=4aa82d16a9bc6f293cb857ded45b2beec7aca14d#6fd7ec4bda80a3376d591b3e766bce8bf035c4c6_8_10)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 08, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/views/top/index.html.slim
    1 - provide(:title, 'Home page')
    2 = render 'search'
    • phuctmZigexn @phuctm commented Aug 08, 2021
      Master

      = render 'search' đưa vào 1 folder riêng dành cho các partial được sử dụng ở các view khác, ví dụ:

      = render 'components/search_box'

      = render 'latest_jobs'
      = render 'top_cities'
      = render 'top_industries'
      

      không cần thiết tách ra partial nếu không có chỗ cần sử dụng lại.

      `= render 'search'` đưa vào 1 folder riêng dành cho các partial được sử dụng ở các view khác, ví dụ: `= render 'components/search_box'` ``` = render 'latest_jobs' = render 'top_cities' = render 'top_industries' ``` **không cần thiết tách ra partial nếu không có chỗ cần sử dụng lại.**
    • Mai Hoang Thai Ha @hamht

      changed this line in version 11 of the diff

      Aug 09, 2021

      changed this line in version 11 of the diff

      changed this line in [version 11 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5391&start_sha=4aa82d16a9bc6f293cb857ded45b2beec7aca14d#cfdafb2f51e8fbf6ccf67b5cbdb89d4b6199d8c2_2_2)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 08, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/views/top/_top_cities.html.slim 0 → 100644
    1 .top_cities.mb-5
    2 .container
    3 h2 Top cities
    4 hr.my-2
    5 .row.align-items-start.mb-3
    6 - @top_cities.each do |city, city_jobs|
    7 .col-4.city-item
    8 = link_to city.name, city_jobs_path(City.find_by(name: city.name).slug), class: 'city-name'
    • phuctmZigexn @phuctm commented Aug 08, 2021
      Master

      không query DB ở view

      = link_to city.name, city_jobs_path(City.find_by(name: city.name).slug), class: 'city-name'
      **không query DB ở view** ``` = link_to city.name, city_jobs_path(City.find_by(name: city.name).slug), class: 'city-name' ```
    • Mai Hoang Thai Ha @hamht

      changed this line in version 11 of the diff

      Aug 09, 2021

      changed this line in version 11 of the diff

      changed this line in [version 11 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5391&start_sha=4aa82d16a9bc6f293cb857ded45b2beec7aca14d#2dfa7e700b6fb7821581263c65d3e4c71bd9ab76_8_0)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 08, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/views/top/_top_industries.html.slim 0 → 100644
    1 .top_industries.mb-5
    2 .container
    3 h2 Top industries
    4 hr.my-2
    5 .row.align-items-start
    6 - @top_industries.each do |industry, industry_jobs|
    7 .col-4.industry-item
    8 = link_to industry.name, industry_jobs_path(Industry.find_by(name: industry.name).slug), class: 'industry-name'
    • phuctmZigexn @phuctm commented Aug 08, 2021
      Master

      không query DB ở view

      = link_to industry.name, industry_jobs_path(Industry.find_by(name: industry.name).slug), class: 'industry-name'
      **không query DB ở view** ``` = link_to industry.name, industry_jobs_path(Industry.find_by(name: industry.name).slug), class: 'industry-name' ```
    • Mai Hoang Thai Ha @hamht

      changed this line in version 11 of the diff

      Aug 09, 2021

      changed this line in version 11 of the diff

      changed this line in [version 11 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5391&start_sha=4aa82d16a9bc6f293cb857ded45b2beec7aca14d#406c801636c8102b4b91d4612fdbc7a25e986bb3_8_0)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 08, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/helpers/cities_helper.rb 0 → 100644
    1 module CitiesHelper
    • phuctmZigexn @phuctm commented Aug 08, 2021
      Master

      Không query DB ở helper. Helper chỉ dùng để support cho view

      => remove luôn helper này

      **Không query DB ở helper. Helper chỉ dùng để support cho view** => remove luôn helper này
    • Mai Hoang Thai Ha @hamht

      changed this line in version 12 of the diff

      Aug 09, 2021

      changed this line in version 12 of the diff

      changed this line in [version 12 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5392&start_sha=25f4d82ed48a6a3973c789fa4e04736ced018e50#0389571bb5d22b70a808ea0b8c3a1a52460327a6_1_0)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 08, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/views/cities/index.html.slim 0 → 100644
    1 = render 'regions_list'
    • phuctmZigexn @phuctm commented Aug 08, 2021
      Master

      không cần phải tách ra partial

      **không cần phải tách ra partial**
    • Mai Hoang Thai Ha @hamht

      changed this line in version 11 of the diff

      Aug 09, 2021

      changed this line in version 11 of the diff

      changed this line in [version 11 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5391&start_sha=4aa82d16a9bc6f293cb857ded45b2beec7aca14d#52ce499218a8f695fbe7e201c2778fd79469eb30_1_1)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on the diff Aug 08, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/models/city.rb
    3 5 enum region: { vietnam: 0, international: 1 }
    6
    7 validates :slug, presence: true, uniqueness: { case_sensitive: true }
    8
    9 def to_params
    10 slug
    11 end
    12
    13 def add_slugs
    14 update slug: to_slug(name)
    15 end
    16
    17 def self.top_jobs
    18 self.all.map { |city| [city, city.jobs.count] }.sort_by(&:second).reverse.take(9)
    19 end
    4 20 end
    • phuctmZigexn @phuctm commented Aug 08, 2021
      Master
      def job_quantity_by_region
            { vietnam: 0, international: 1 }.each_with_object({}) do |(name, _), hash|
              hash[name.to_sym] = send(name).joins(:jobs).group(:name, :slug)
                                            .order('COUNT(jobs.id) DESC').count
            end
          end
      ``` def job_quantity_by_region { vietnam: 0, international: 1 }.each_with_object({}) do |(name, _), hash| hash[name.to_sym] = send(name).joins(:jobs).group(:name, :slug) .order('COUNT(jobs.id) DESC').count end end ```
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on the diff Aug 08, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/controllers/cities_controller.rb 0 → 100644
    1 class CitiesController < ApplicationController
    • phuctmZigexn @phuctm commented Aug 08, 2021
      Master
      class CitiesController < ApplicationController
        def index
          @regions = City.regions.keys
          @job_quantity_by_region = City.job_quantity_by_region
        end
      end
      ``` class CitiesController < ApplicationController def index @regions = City.regions.keys @job_quantity_by_region = City.job_quantity_by_region end end ```
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 08, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/controllers/cities_controller.rb 0 → 100644
    1 class CitiesController < ApplicationController
    2 def index
    3 @region_job_list = City.jobs_count
    4 end
    5
    6 def show
    • phuctmZigexn @phuctm commented Aug 08, 2021
      Master

      ko có sử dụng show => xóa luôn

      ko có sử dụng show => xóa luôn
    • Mai Hoang Thai Ha @hamht

      changed this line in version 11 of the diff

      Aug 09, 2021

      changed this line in version 11 of the diff

      changed this line in [version 11 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5391&start_sha=4aa82d16a9bc6f293cb857ded45b2beec7aca14d#9331f3d6803b80e59ba5cd648677b3c6869d2ac8_6_3)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 08, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/controllers/industries_controller.rb 0 → 100644
    1 class IndustriesController < ApplicationController
    2 def index
    3 # @industries_job_list = Industry.joins(:jobs).group(:name).count.sort_by(&:first)
    • phuctmZigexn @phuctm commented Aug 08, 2021
      Master

      ko để lại comment code => xóa luôn

      ko để lại comment code => xóa luôn
    • Mai Hoang Thai Ha @hamht

      changed this line in version 11 of the diff

      Aug 09, 2021

      changed this line in version 11 of the diff

      changed this line in [version 11 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5391&start_sha=4aa82d16a9bc6f293cb857ded45b2beec7aca14d#8bfde426f74e8d23c0c9c1eda9e7e68995e0c3ee_3_3)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 08, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/controllers/industries_controller.rb 0 → 100644
    1 class IndustriesController < ApplicationController
    2 def index
    3 # @industries_job_list = Industry.joins(:jobs).group(:name).count.sort_by(&:first)
    4 @industries_job_list = Industry.jobs_count
    5 end
    6 def show
    • phuctmZigexn @phuctm commented Aug 08, 2021
      Master

      xóa luôn

      xóa luôn
    • Mai Hoang Thai Ha @hamht

      changed this line in version 11 of the diff

      Aug 09, 2021

      changed this line in version 11 of the diff

      changed this line in [version 11 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5391&start_sha=4aa82d16a9bc6f293cb857ded45b2beec7aca14d#8bfde426f74e8d23c0c9c1eda9e7e68995e0c3ee_6_3)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 08, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/controllers/jobs_controller.rb 0 → 100644
    1 class JobsController < ApplicationController
    2 def index
    3 if params[:city_slug].present?
    • phuctmZigexn @phuctm commented Aug 08, 2021
      Master
      def search
          if job_params.key?(:model) && job_params.key?(:slug) # search by model
            model = params[:model].classify.constantize
            @target = model.find_by(slug: job_params[:slug])
            @jobs = @target.jobs.page(params[:page]).per(20)
          elsif job_params.key?(:search)  # search by keywords
            wildcard_search = "%#{job_params[:search]}%"
            @jobs = Job.where('name ILIKE ? OR postal_code LIKE ?', wildcard_search, wildcard_search)
                       .page(params[:page]).per(Job::JOB_PER_PAGE)
          end
        end
      ``` def search if job_params.key?(:model) && job_params.key?(:slug) # search by model model = params[:model].classify.constantize @target = model.find_by(slug: job_params[:slug]) @jobs = @target.jobs.page(params[:page]).per(20) elsif job_params.key?(:search) # search by keywords wildcard_search = "%#{job_params[:search]}%" @jobs = Job.where('name ILIKE ? OR postal_code LIKE ?', wildcard_search, wildcard_search) .page(params[:page]).per(Job::JOB_PER_PAGE) end end ```
    • Mai Hoang Thai Ha @hamht

      changed this line in version 11 of the diff

      Aug 09, 2021

      changed this line in version 11 of the diff

      changed this line in [version 11 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5391&start_sha=4aa82d16a9bc6f293cb857ded45b2beec7aca14d#6fa69a07843a58f190bf4d7e0692b9cc5b0bf52b_3_3)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 08, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    config/initializers/string.rb 0 → 100644
    1 class String
    2 def to_slug
    3 source = [
    4 'à', 'á', 'â', 'ã', 'è', 'é', 'ê', 'ì', 'í', 'ò',
    5 'ó', 'ô', 'õ', 'ù', 'ú', 'ý', 'ă', 'đ', 'ĩ', 'ũ',
    6 'ơ', 'ư', 'ạ', 'ả', 'ấ', 'ầ', 'ẩ', 'ẫ', 'ậ', 'ắ',
    7 'ằ', 'ẳ', 'ẵ', 'ặ', 'ẹ', 'ẻ', 'ẽ', 'ế', 'ề', 'ể',
    8 'ễ', 'ệ', 'ỉ', 'ị', 'ọ', 'ỏ', 'ố', 'ồ', 'ổ', 'ỗ',
    9 'ộ', 'ớ', 'ờ', 'ở', 'ỡ', 'ợ', 'ụ', 'ủ', 'ứ', 'ừ',
    10 'ử', 'ữ', 'ự', 'ỳ', 'ỷ', 'ỹ', 'ỵ'
    11 ]
    • phuctmZigexn @phuctm commented Aug 08, 2021
      Master

      thêm .freeze vào array này

      ref: https://www.honeybadger.io/blog/when-to-use-freeze-and-frozen-in-ruby/

      tương tự với destination

      thêm `.freeze` vào array này ref: https://www.honeybadger.io/blog/when-to-use-freeze-and-frozen-in-ruby/ tương tự với `destination`
    • phuctmZigexn @phuctm commented Aug 08, 2021
      Master

      fix rubocop

      fix rubocop
    • Mai Hoang Thai Ha @hamht

      changed this line in version 11 of the diff

      Aug 09, 2021

      changed this line in version 11 of the diff

      changed this line in [version 11 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5391&start_sha=4aa82d16a9bc6f293cb857ded45b2beec7aca14d#e14c0fb50742857de9ecbfa83f298500a9916d36_11_3)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 08, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    config/initializers/string.rb 0 → 100644
    7 'ằ', 'ẳ', 'ẵ', 'ặ', 'ẹ', 'ẻ', 'ẽ', 'ế', 'ề', 'ể',
    8 'ễ', 'ệ', 'ỉ', 'ị', 'ọ', 'ỏ', 'ố', 'ồ', 'ổ', 'ỗ',
    9 'ộ', 'ớ', 'ờ', 'ở', 'ỡ', 'ợ', 'ụ', 'ủ', 'ứ', 'ừ',
    10 'ử', 'ữ', 'ự', 'ỳ', 'ỷ', 'ỹ', 'ỵ'
    11 ]
    12 destination = [
    13 'a', 'a', 'a', 'a', 'e', 'e', 'e', 'i', 'i', 'o',
    14 'o', 'o', 'o', 'u', 'u', 'y', 'a', 'd', 'i', 'u',
    15 'o', 'u', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a',
    16 'a', 'a', 'a', 'a', 'e', 'e', 'e', 'e', 'e', 'e',
    17 'e', 'e', 'i', 'i', 'o', 'o', 'o', 'o', 'o', 'o',
    18 'o', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'u',
    19 'u', 'u', 'u', 'y', 'y', 'y', 'y'
    20 ]
    21 hash = Hash[source.zip destination]
    22 self.downcase.encode('ASCII', 'UTF-8', fallback: hash).gsub(' ', '-').parameterize.truncate 80
    • phuctmZigexn @phuctm commented Aug 08, 2021
      Master

      không cần phải truncate 80

      không cần phải `truncate 80`
    • Mai Hoang Thai Ha @hamht

      changed this line in version 11 of the diff

      Aug 09, 2021

      changed this line in version 11 of the diff

      changed this line in [version 11 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5391&start_sha=4aa82d16a9bc6f293cb857ded45b2beec7aca14d#e14c0fb50742857de9ecbfa83f298500a9916d36_22_12)
      Toggle commit list
    Please register or sign in to reply
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • 25f4d82e - fixed review

    Compare with previous version

    Aug 09, 2021

    added 1 commit

    • 25f4d82e - fixed review

    Compare with previous version

    added 1 commit * 25f4d82e - fixed review [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5391&start_sha=4aa82d16a9bc6f293cb857ded45b2beec7aca14d)
    Toggle commit list
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 09, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/assets/stylesheets/custom.scss
    77 }
    78
    79 // Top page
    80 // search
    81
    82
    83 // latest-job
    • phuctmZigexn @phuctm commented Aug 09, 2021
      Master

      đống CSS chỗ này em chưa tách ra file riêng nè.

      đống CSS chỗ này em chưa tách ra file riêng nè.
    • Mai Hoang Thai Ha @hamht

      changed this line in version 13 of the diff

      Aug 09, 2021

      changed this line in version 13 of the diff

      changed this line in [version 13 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5393&start_sha=b20cc8af1de26629c6382e0776ca5b739295ce73#79a66919b2dd7890dc5d183a3a7a2dd60f7447b3_83_78)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 09, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/models/industry.rb
    1 1 class Industry < ApplicationRecord
    2 scope :jobs_count, -> { joins(:jobs).group(:name).count.sort_by(&:first) }
    • phuctmZigexn @phuctm commented Aug 09, 2021
      Master

      scope này mình ko dùng thì nên xóa đi nha

      scope này mình ko dùng thì nên xóa đi nha
    • Mai Hoang Thai Ha @hamht

      changed this line in version 13 of the diff

      Aug 09, 2021

      changed this line in version 13 of the diff

      changed this line in [version 13 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5393&start_sha=b20cc8af1de26629c6382e0776ca5b739295ce73#6fd7ec4bda80a3376d591b3e766bce8bf035c4c6_2_2)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 09, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/views/top/index.html.slim
    1 - provide(:title, 'Home page')
    2 / search box
    3 = render 'shared/search'
    4 / latest job
    5 .latest-job.mb-5
    6 .container.mb-5
    7 h2
    8 | Latest jobs
    9 hr.my-2
    10 - @latest_jobs.each do |job|
    11 .job-item.mb-4
    12 = link_to job.title, job_path(job.id), class: "job-title"
    • phuctmZigexn @phuctm commented Aug 09, 2021
      Master
      = link_to job.title, job_path(job.id), class: "job-title"

      chỗ này em có thể để là

      = link_to job.title, job, class: "job-title"

      Em xem qua document của link_to nè, phần example đó: https://apidock.com/rails/ActionView/Helpers/UrlHelper/link_to

      Edited Aug 09, 2021 by phuctmZigexn
      ``` = link_to job.title, job_path(job.id), class: "job-title" ``` chỗ này em có thể để là ``` = link_to job.title, job, class: "job-title" ``` Em xem qua document của link_to nè, phần example đó: https://apidock.com/rails/ActionView/Helpers/UrlHelper/link_to
    • Mai Hoang Thai Ha @hamht

      changed this line in version 12 of the diff

      Aug 09, 2021

      changed this line in version 12 of the diff

      changed this line in [version 12 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5392&start_sha=25f4d82ed48a6a3973c789fa4e04736ced018e50#cfdafb2f51e8fbf6ccf67b5cbdb89d4b6199d8c2_12_12)
      Toggle commit list
    Please register or sign in to reply
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • b20cc8af - fixed codestyle

    Compare with previous version

    Aug 09, 2021

    added 1 commit

    • b20cc8af - fixed codestyle

    Compare with previous version

    added 1 commit * b20cc8af - fixed codestyle [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5392&start_sha=25f4d82ed48a6a3973c789fa4e04736ced018e50)
    Toggle commit list
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 09, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/views/jobs/index.html.slim 0 → 100644
    3 = render 'shared/search'
    4 .container
    5 h1.mt-5
    6 = @name
    7 hr.my-4
    8 .no-padding.d-flex.align-items-center.flex-column
    9 .page-info.p-2
    10 = page_entries_info @jobs
    11 .page-info.p-2
    12 = paginate @jobs
    13 .container
    14 .container
    15 - @jobs.each do |job|
    16 / job
    17 .job-item
    18 = link_to job.title, job_path(Job.find_by(title: job.title).id), class: 'job-title fs-3 text-decoration-none text-reset'
    • phuctmZigexn @phuctm commented Aug 09, 2021
      Master

      vẫn còn query DB ở view nè em

      vẫn còn query DB ở view nè em
    • Mai Hoang Thai Ha @hamht

      changed this line in version 13 of the diff

      Aug 09, 2021

      changed this line in version 13 of the diff

      changed this line in [version 13 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5393&start_sha=b20cc8af1de26629c6382e0776ca5b739295ce73#7aab1963773242ab7021ef6dba7810758f4405eb_18_18)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 09, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/views/jobs/show.html.slim 0 → 100644
    1 .container.my-5
    2 / breadcrumb
    3 .breadcrumb
    4 = link_to root_path, class: 'text-decoration-none text-info' do
    5 'Home
    6 span.d-block.mx-2
    7 | >
    8 - city_list = @job.cities
    • phuctmZigexn @phuctm commented Aug 09, 2021
      Master

      - city_list = @job.cities

      những code mà em gán value vào 1 biến như này thì em chuyển nó lên hàng số 1, rồi viết theo kiểu này nè.

      1: ruby:
      2:   city_list = @job.cities
      3: 
      4: // code html
      5: div
      6:   p

      nghĩa là với các dòng code ruby như trên, em chuyển nó lên trên cùng luôn.

      `- city_list = @job.cities` những code mà em gán value vào 1 biến như này thì em chuyển nó lên hàng số 1, rồi viết theo kiểu này nè. ``` 1: ruby: 2: city_list = @job.cities 3: 4: // code html 5: div 6: p ``` nghĩa là với các dòng code ruby như trên, em chuyển nó lên trên cùng luôn.
    • Mai Hoang Thai Ha @hamht

      changed this line in version 13 of the diff

      Aug 09, 2021

      changed this line in version 13 of the diff

      changed this line in [version 13 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5393&start_sha=b20cc8af1de26629c6382e0776ca5b739295ce73#4f6f8650adc8fcba290a4f6bdab798db3c6df37e_8_12)
      Toggle commit list
    Please register or sign in to reply
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • 7a1e0d6f - fixed review

    Compare with previous version

    Aug 09, 2021

    added 1 commit

    • 7a1e0d6f - fixed review

    Compare with previous version

    added 1 commit * 7a1e0d6f - fixed review [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5393&start_sha=b20cc8af1de26629c6382e0776ca5b739295ce73)
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    resolved all discussions

    Aug 09, 2021

    resolved all discussions

    resolved all discussions
    Toggle commit list
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 09, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/assets/stylesheets/top.scss
    1 // Place all the styles related to the Top controller here.
    2 // They will automatically be included in application.css.
    3 // You can use Sass (SCSS) here: https://sass-lang.com/
    1 $white: #fff;
    • phuctmZigexn @phuctm commented Aug 09, 2021
      Master

      đống variable này em nên tách ra 1 file nữa cho dễ quản lý. Tương tự như cách bootstrap làm đó. Tuy nhiên, cái nào ko dùng thì xóa đi nha, chứ đừng copy bên sách qua đây làm chi rồi để đó.

      app/assets/stylesheets/shared/_variables.scss

      đống variable này em nên tách ra 1 file nữa cho dễ quản lý. Tương tự như cách bootstrap làm đó. Tuy nhiên, cái nào ko dùng thì xóa đi nha, chứ đừng copy bên sách qua đây làm chi rồi để đó. `app/assets/stylesheets/shared/_variables.scss`
    • Mai Hoang Thai Ha @hamht

      changed this line in version 14 of the diff

      Aug 09, 2021

      changed this line in version 14 of the diff

      changed this line in [version 14 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5394&start_sha=7a1e0d6f8cdb499cbb6b341069d30342a64982ba#42e403e629ae293c475bf877ce4fd33e85822276_1_1)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 09, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/views/cities/index.html.slim 0 → 100644
    3 .container.py-5
    4 h2.mt-0 REGION
    5 hr.my-4
    6 .row
    7 - @regions.each do |region|
    8 .col-lg-4.col-md-6.text-center
    9 .mt-5
    10 h3.h4.mb-2.text-white.see-more-text= link_to region, anchor: region
    11 // cities list
    12 .cities-list
    13 .container
    14 - @job_quantity_by_region.each do |region, city_job_count|
    15 .countries-job-list id=region
    16 .container-fullwidth.py-5
    17 h2.mt-0
    18 = region
    • phuctmZigexn @phuctm commented Aug 09, 2021
      Master

      = region => Chỗ này em ko xử lý gì thêm thì nó in ra là vietnam, international sao.

      Ý là ko có viết hoa chữ cái đầu luôn kìa

      tương tự với dòng

      = link_to region, anchor: region

      ở trên kìa

      `= region` => Chỗ này em ko xử lý gì thêm thì nó in ra là `vietnam`, `international` sao. Ý là ko có viết hoa chữ cái đầu luôn kìa tương tự với dòng ``` = link_to region, anchor: region ``` ở trên kìa
    • Mai Hoang Thai Ha @hamht

      changed this line in version 14 of the diff

      Aug 09, 2021

      changed this line in version 14 of the diff

      changed this line in [version 14 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5394&start_sha=7a1e0d6f8cdb499cbb6b341069d30342a64982ba#52ce499218a8f695fbe7e201c2778fd79469eb30_18_18)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 09, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/views/cities/index.html.slim 0 → 100644
    3 .container.py-5
    4 h2.mt-0 REGION
    5 hr.my-4
    6 .row
    7 - @regions.each do |region|
    8 .col-lg-4.col-md-6.text-center
    9 .mt-5
    10 h3.h4.mb-2.text-white.see-more-text= link_to region, anchor: region
    11 // cities list
    12 .cities-list
    13 .container
    14 - @job_quantity_by_region.each do |region, city_job_count|
    15 .countries-job-list id=region
    16 .container-fullwidth.py-5
    17 h2.mt-0
    18 = region
    • phuctmZigexn @phuctm commented Aug 09, 2021
      Master

      = region => Chỗ này em ko xử lý gì thêm thì nó in ra là vietnam, international sao.

      Ý là ko có viết hoa chữ cái đầu luôn kìa

      tương tự với dòng

      = link_to region, anchor: region

      ở trên kìa

      `= region` => Chỗ này em ko xử lý gì thêm thì nó in ra là `vietnam`, `international` sao. Ý là ko có viết hoa chữ cái đầu luôn kìa tương tự với dòng ``` = link_to region, anchor: region ``` ở trên kìa
    • Mai Hoang Thai Ha @hamht

      changed this line in version 14 of the diff

      Aug 09, 2021

      changed this line in version 14 of the diff

      changed this line in [version 14 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5394&start_sha=7a1e0d6f8cdb499cbb6b341069d30342a64982ba#52ce499218a8f695fbe7e201c2778fd79469eb30_18_18)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 09, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/views/cities/index.html.slim 0 → 100644
    3 .container.py-5
    4 h2.mt-0 REGION
    5 hr.my-4
    6 .row
    7 - @regions.each do |region|
    8 .col-lg-4.col-md-6.text-center
    9 .mt-5
    10 h3.h4.mb-2.text-white.see-more-text= link_to region, anchor: region
    11 // cities list
    12 .cities-list
    13 .container
    14 - @job_quantity_by_region.each do |region, city_job_count|
    15 .countries-job-list id=region
    16 .container-fullwidth.py-5
    17 h2.mt-0
    18 = region
    • phuctmZigexn @phuctm commented Aug 09, 2021
      Master

      = region => Chỗ này em ko xử lý gì thêm thì nó in ra là vietnam, international sao.

      Ý là ko có viết hoa chữ cái đầu luôn kìa

      tương tự với dòng

      = link_to region, anchor: region

      ở trên kìa

      `= region` => Chỗ này em ko xử lý gì thêm thì nó in ra là `vietnam`, `international` sao. Ý là ko có viết hoa chữ cái đầu luôn kìa tương tự với dòng ``` = link_to region, anchor: region ``` ở trên kìa
    • Mai Hoang Thai Ha @hamht

      changed this line in version 14 of the diff

      Aug 09, 2021

      changed this line in version 14 of the diff

      changed this line in [version 14 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5394&start_sha=7a1e0d6f8cdb499cbb6b341069d30342a64982ba#52ce499218a8f695fbe7e201c2778fd79469eb30_18_18)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 09, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/views/cities/index.html.slim 0 → 100644
    3 .container.py-5
    4 h2.mt-0 REGION
    5 hr.my-4
    6 .row
    7 - @regions.each do |region|
    8 .col-lg-4.col-md-6.text-center
    9 .mt-5
    10 h3.h4.mb-2.text-white.see-more-text= link_to region, anchor: region
    11 // cities list
    12 .cities-list
    13 .container
    14 - @job_quantity_by_region.each do |region, city_job_count|
    15 .countries-job-list id=region
    16 .container-fullwidth.py-5
    17 h2.mt-0
    18 = region
    • phuctmZigexn @phuctm commented Aug 09, 2021
      Master

      = region => Chỗ này em ko xử lý gì thêm thì nó in ra là vietnam, international sao.

      Ý là ko có viết hoa chữ cái đầu luôn kìa

      tương tự với dòng

      = link_to region, anchor: region

      ở trên kìa

      `= region` => Chỗ này em ko xử lý gì thêm thì nó in ra là `vietnam`, `international` sao. Ý là ko có viết hoa chữ cái đầu luôn kìa tương tự với dòng ``` = link_to region, anchor: region ``` ở trên kìa
    • Mai Hoang Thai Ha @hamht

      changed this line in version 14 of the diff

      Aug 09, 2021

      changed this line in version 14 of the diff

      changed this line in [version 14 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5394&start_sha=7a1e0d6f8cdb499cbb6b341069d30342a64982ba#52ce499218a8f695fbe7e201c2778fd79469eb30_18_18)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 09, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/views/cities/index.html.slim 0 → 100644
    3 .container.py-5
    4 h2.mt-0 REGION
    5 hr.my-4
    6 .row
    7 - @regions.each do |region|
    8 .col-lg-4.col-md-6.text-center
    9 .mt-5
    10 h3.h4.mb-2.text-white.see-more-text= link_to region, anchor: region
    11 // cities list
    12 .cities-list
    13 .container
    14 - @job_quantity_by_region.each do |region, city_job_count|
    15 .countries-job-list id=region
    16 .container-fullwidth.py-5
    17 h2.mt-0
    18 = region
    • phuctmZigexn @phuctm commented Aug 09, 2021
      Master

      = region => Chỗ này em ko xử lý gì thêm thì nó in ra là vietnam, international sao.

      Ý là ko có viết hoa chữ cái đầu luôn kìa

      tương tự với dòng

      = link_to region, anchor: region

      ở trên kìa

      `= region` => Chỗ này em ko xử lý gì thêm thì nó in ra là `vietnam`, `international` sao. Ý là ko có viết hoa chữ cái đầu luôn kìa tương tự với dòng ``` = link_to region, anchor: region ``` ở trên kìa
    • Mai Hoang Thai Ha @hamht

      changed this line in version 14 of the diff

      Aug 09, 2021

      changed this line in version 14 of the diff

      changed this line in [version 14 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5394&start_sha=7a1e0d6f8cdb499cbb6b341069d30342a64982ba#52ce499218a8f695fbe7e201c2778fd79469eb30_18_18)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 09, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/views/cities/index.html.slim 0 → 100644
    3 .container.py-5
    4 h2.mt-0 REGION
    5 hr.my-4
    6 .row
    7 - @regions.each do |region|
    8 .col-lg-4.col-md-6.text-center
    9 .mt-5
    10 h3.h4.mb-2.text-white.see-more-text= link_to region, anchor: region
    11 // cities list
    12 .cities-list
    13 .container
    14 - @job_quantity_by_region.each do |region, city_job_count|
    15 .countries-job-list id=region
    16 .container-fullwidth.py-5
    17 h2.mt-0
    18 = region
    • phuctmZigexn @phuctm commented Aug 09, 2021
      Master

      = region => Chỗ này em ko xử lý gì thêm thì nó in ra là vietnam, international sao.

      Ý là ko có viết hoa chữ cái đầu luôn kìa

      tương tự với dòng

      = link_to region, anchor: region

      ở trên kìa

      `= region` => Chỗ này em ko xử lý gì thêm thì nó in ra là `vietnam`, `international` sao. Ý là ko có viết hoa chữ cái đầu luôn kìa tương tự với dòng ``` = link_to region, anchor: region ``` ở trên kìa
    • Mai Hoang Thai Ha @hamht

      changed this line in version 14 of the diff

      Aug 09, 2021

      changed this line in version 14 of the diff

      changed this line in [version 14 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5394&start_sha=7a1e0d6f8cdb499cbb6b341069d30342a64982ba#52ce499218a8f695fbe7e201c2778fd79469eb30_18_18)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 09, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/views/cities/index.html.slim 0 → 100644
    3 .container.py-5
    4 h2.mt-0 REGION
    5 hr.my-4
    6 .row
    7 - @regions.each do |region|
    8 .col-lg-4.col-md-6.text-center
    9 .mt-5
    10 h3.h4.mb-2.text-white.see-more-text= link_to region, anchor: region
    11 // cities list
    12 .cities-list
    13 .container
    14 - @job_quantity_by_region.each do |region, city_job_count|
    15 .countries-job-list id=region
    16 .container-fullwidth.py-5
    17 h2.mt-0
    18 = region
    • phuctmZigexn @phuctm commented Aug 09, 2021
      Master

      = region => Chỗ này em ko xử lý gì thêm thì nó in ra là vietnam, international sao.

      Ý là ko có viết hoa chữ cái đầu luôn kìa

      tương tự với dòng

      = link_to region, anchor: region

      ở trên kìa

      `= region` => Chỗ này em ko xử lý gì thêm thì nó in ra là `vietnam`, `international` sao. Ý là ko có viết hoa chữ cái đầu luôn kìa tương tự với dòng ``` = link_to region, anchor: region ``` ở trên kìa
    • Mai Hoang Thai Ha @hamht

      changed this line in version 14 of the diff

      Aug 09, 2021

      changed this line in version 14 of the diff

      changed this line in [version 14 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5394&start_sha=7a1e0d6f8cdb499cbb6b341069d30342a64982ba#52ce499218a8f695fbe7e201c2778fd79469eb30_18_18)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 09, 2021
    Resolved by Mai Hoang Thai Ha Aug 09, 2021
    app/views/cities/index.html.slim 0 → 100644
    3 .container.py-5
    4 h2.mt-0 REGION
    5 hr.my-4
    6 .row
    7 - @regions.each do |region|
    8 .col-lg-4.col-md-6.text-center
    9 .mt-5
    10 h3.h4.mb-2.text-white.see-more-text= link_to region, anchor: region
    11 // cities list
    12 .cities-list
    13 .container
    14 - @job_quantity_by_region.each do |region, city_job_count|
    15 .countries-job-list id=region
    16 .container-fullwidth.py-5
    17 h2.mt-0
    18 = region
    • phuctmZigexn @phuctm commented Aug 09, 2021
      Master

      = region => Chỗ này em ko xử lý gì thêm thì nó in ra là vietnam, international sao.

      Ý là ko có viết hoa chữ cái đầu luôn kìa

      tương tự với dòng

      = link_to region, anchor: region

      ở trên kìa

      `= region` => Chỗ này em ko xử lý gì thêm thì nó in ra là `vietnam`, `international` sao. Ý là ko có viết hoa chữ cái đầu luôn kìa tương tự với dòng ``` = link_to region, anchor: region ``` ở trên kìa
    • Mai Hoang Thai Ha @hamht

      changed this line in version 14 of the diff

      Aug 09, 2021

      changed this line in version 14 of the diff

      changed this line in [version 14 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5394&start_sha=7a1e0d6f8cdb499cbb6b341069d30342a64982ba#52ce499218a8f695fbe7e201c2778fd79469eb30_18_18)
      Toggle commit list
    Please register or sign in to reply
  • Mai Hoang Thai Ha @hamht

    resolved all discussions

    Aug 09, 2021

    resolved all discussions

    resolved all discussions
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • 0e3f626d - fixed model and view

    Compare with previous version

    Aug 09, 2021

    added 1 commit

    • 0e3f626d - fixed model and view

    Compare with previous version

    added 1 commit * 0e3f626d - fixed model and view [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5394&start_sha=7a1e0d6f8cdb499cbb6b341069d30342a64982ba)
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • a36e20ca - add includes to action index of job controller

    Compare with previous version

    Aug 09, 2021

    added 1 commit

    • a36e20ca - add includes to action index of job controller

    Compare with previous version

    added 1 commit * a36e20ca - add includes to action index of job controller [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5396&start_sha=0e3f626d11adef86d02928df6e3c03b524e0d51f)
    Toggle commit list
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 09, 2021
    Resolved by Mai Hoang Thai Ha Aug 10, 2021
    app/controllers/jobs_controller.rb 0 → 100644
    8 end
    9
    10 def show
    11 @job = Job.find(params[:id])
    12 end
    13
    14 private
    15
    16 def search
    17 if job_params.key?(:model) && job_params.key?(:slug) # search by model
    18 model = params[:model].classify.constantize
    19 @target = model.find_by(slug: job_params[:slug])
    20 @jobs = @target.jobs.includes(:company).page(params[:page]).per(20)
    21 elsif job_params.key?(:search) # search by keywords
    22 wildcard_search = "%#{job_params[:search]}%"
    23 @jobs = Job.where('name ILIKE ? OR postal_code LIKE ?', wildcard_search, wildcard_search)
    • phuctmZigexn @phuctm commented Aug 09, 2021
      Master

      ủa name với postal_code gì đây :)))

      ủa `name` với `postal_code` gì đây :)))
    • Mai Hoang Thai Ha @hamht

      changed this line in version 17 of the diff

      Aug 10, 2021

      changed this line in version 17 of the diff

      changed this line in [version 17 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5398&start_sha=f3cf955b7affe9a44481b4abd0898190f441712e#6fa69a07843a58f190bf4d7e0692b9cc5b0bf52b_23_21)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 09, 2021
    Resolved by Mai Hoang Thai Ha Aug 10, 2021
    app/controllers/jobs_controller.rb 0 → 100644
    1 class JobsController < ApplicationController
    2 def index
    3 if job_params.present?
    4 search
    5 else
    6 @jobs = Job.includes(:company).page(params[:page]).per(20)
    • phuctmZigexn @phuctm commented Aug 09, 2021
      Master

      per(20) số 20 gì đây :v

      `per(20)` số 20 gì đây :v
    • Mai Hoang Thai Ha @hamht commented Aug 10, 2021
      Master

      pagination anh ơi

      pagination anh ơi
    • Mai Hoang Thai Ha @hamht

      changed this line in version 16 of the diff

      Aug 10, 2021

      changed this line in version 16 of the diff

      changed this line in [version 16 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5397&start_sha=a36e20ca6397bd443d379a690b3f1c21e1f87790#6fa69a07843a58f190bf4d7e0692b9cc5b0bf52b_6_6)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 09, 2021
    Resolved by Mai Hoang Thai Ha Aug 10, 2021
    app/views/layouts/application.html.slim
    2 2 html
    3 3 head
    4 4 title
    5 | hi
    6 - # <%= full_title(yield(:title))
    7 meta[name="viewport" content="width=device-width,initial-scale=1" charset="utf-8"]
    5 =full_title(yield(:title))
    • phuctmZigexn @phuctm commented Aug 09, 2021
      Master

      =full_title(yield(:title)) space chỗ dấu = ra nè

      `=full_title(yield(:title))` space chỗ dấu `=` ra nè
    • Mai Hoang Thai Ha @hamht

      changed this line in version 16 of the diff

      Aug 10, 2021

      changed this line in version 16 of the diff

      changed this line in [version 16 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5397&start_sha=a36e20ca6397bd443d379a690b3f1c21e1f87790#58e8d4fee0064dd4b253a2ea5eeaa4c21becb071_5_5)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 09, 2021
    Resolved by Mai Hoang Thai Ha Aug 10, 2021
    app/views/top/index.html.slim
    1 - provide(:title, 'Home page')
    2 / search box
    3 .container
    4 .row.text-center
    5 .col
    6 h2.my-4
    7 | Total: #{pluralize(@total_job, "job")}
    • phuctmZigexn @phuctm commented Aug 09, 2021
      Master

      chỗ này requirement có yêu cầu 1 cái banner nè em

      https://docs.google.com/spreadsheets/d/1n1OJiih1xkys1L2wZnV4bHZVxRr_80bEnsewm4EcZVI/edit#gid=1847877026&range=C87

      chỗ này requirement có yêu cầu 1 cái banner nè em https://docs.google.com/spreadsheets/d/1n1OJiih1xkys1L2wZnV4bHZVxRr_80bEnsewm4EcZVI/edit#gid=1847877026&range=C87
    • Mai Hoang Thai Ha @hamht

      changed this line in version 16 of the diff

      Aug 10, 2021

      changed this line in version 16 of the diff

      changed this line in [version 16 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5397&start_sha=a36e20ca6397bd443d379a690b3f1c21e1f87790#cfdafb2f51e8fbf6ccf67b5cbdb89d4b6199d8c2_7_4)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on the diff Aug 09, 2021
    Resolved by Mai Hoang Thai Ha Aug 10, 2021
    app/views/top/index.html.slim
    1 - provide(:title, 'Home page')
    2 / search box
    3 .container
    4 .row.text-center
    5 .col
    6 h2.my-4
    7 | Total: #{pluralize(@total_job, "job")}
    8 = render 'shared/search'
    9 / latest job
    • phuctmZigexn @phuctm commented Aug 09, 2021
      Master

      chỗ này mình bắt đầu 1 cái phần mới rồi. Mình enter, break ra 1 line đi cho dễ nhìn. Break line ở trên / latest job á

      chỗ này mình bắt đầu 1 cái phần mới rồi. Mình enter, break ra 1 line đi cho dễ nhìn. Break line ở trên `/ latest job` á
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on the diff Aug 09, 2021
    Resolved by Mai Hoang Thai Ha Aug 10, 2021
    app/views/top/index.html.slim
    8 = render 'shared/search'
    9 / latest job
    10 .latest-job.mb-5
    11 .container.mb-5
    12 h2
    13 | Latest jobs
    14 hr.my-2
    15 - @latest_jobs.each do |job|
    16 .job-item.mb-4
    17 = link_to job.title, job, class: 'job-title'
    18 .job-caption
    19 = link_to job.company.name, '#', class: 'job-company'
    20 p.job-salary
    21 | Salary:
    22 = job.salary
    23 .job-locations
    • phuctmZigexn @phuctm commented Aug 09, 2021
      Master
      .job-locations
        ul
         - job.cities.each do |city|
           li
             = city.name

      Chỗ này em có thể show theo kiểu 1 hàng được không? Ví dụ: Hồ Chí Minh | Hà Nội | Bình Dương

      Edited Aug 09, 2021 by phuctmZigexn
      ``` .job-locations ul - job.cities.each do |city| li = city.name ``` Chỗ này em có thể show theo kiểu 1 hàng được không? Ví dụ: `Hồ Chí Minh | Hà Nội | Bình Dương`
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 09, 2021
    Resolved by Mai Hoang Thai Ha Aug 10, 2021
    app/views/jobs/index.html.slim 0 → 100644
    8 .no-padding.d-flex.align-items-center.flex-column
    9 .page-info.p-2
    10 = page_entries_info @jobs
    11 .page-info.p-2
    12 = paginate @jobs
    13 .container
    14 .container
    15 - @jobs.each do |job|
    16 / job
    17 .job-item
    18 = link_to job.title, job, class: 'job-title fs-3 text-decoration-none text-reset'
    19 .job-caption
    20 = link_to job.company.name, '#', class: 'job-company text-decoration-none text-secondary'
    21 p.job-salary.text-success
    22 | Salary: #{job.salary}
    23 / ul.list-unstyled
    • phuctmZigexn @phuctm commented Aug 09, 2021
      Master

      chỗ này thiếu location nè, sao comment lại rồi

      làm giống như yêu cầu của anh bên trang top nha

      !10 (comment 14620)

      Edited Aug 09, 2021 by phuctmZigexn
      chỗ này thiếu location nè, sao comment lại rồi làm giống như yêu cầu của anh bên trang top nha https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10#note_14620
    • Mai Hoang Thai Ha @hamht

      changed this line in version 16 of the diff

      Aug 10, 2021

      changed this line in version 16 of the diff

      changed this line in [version 16 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5397&start_sha=a36e20ca6397bd443d379a690b3f1c21e1f87790#7aab1963773242ab7021ef6dba7810758f4405eb_23_23)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on the diff Aug 09, 2021
    Resolved by Mai Hoang Thai Ha Aug 10, 2021
    app/views/jobs/show.html.slim 0 → 100644
    22 = ' | ' if i != industry_list.length - 1
    23 span.d-block.mx-2
    24 | >
    25 = @job.title
    26 hr.my-4
    27 / job details
    28 .job-detail.my5
    29 .job-apply.d-flex.align-items-center.justify-content-between
    30 h2.align-items-start
    31 = @job.title
    32 = link_to 'Apply for this job', '#', class: 'btn btn-primary'
    33 p.text-secondary
    34 = @job.company.name
    35 .row.bg-light
    36 .col-4
    37 ul.list-unstyled
    • phuctmZigexn @phuctm commented Aug 09, 2021
      Master

      Phần location này cũng tương tự comment này nha.

      !10 (comment 14620)

      Phần location này cũng tương tự comment này nha. https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10#note_14620
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 09, 2021
    Resolved by Mai Hoang Thai Ha Aug 10, 2021
    app/views/jobs/show.html.slim 0 → 100644
    57 strong
    58 | Position
    59 p
    60 = @job.position
    61 .col-4
    62 ul.list-unstyled
    63 li
    64 strong
    65 | Experience
    66 p
    67 = @job.experience
    68 li
    69 strong
    70 | Expiration date
    71 p
    72 = @job.expiration_date
    • phuctmZigexn @phuctm commented Aug 09, 2021
      Master

      expiration_date đang ở dạng datetime mà 2021-09-04 17:00:00 UTC

      Chuyển qua dạng ngày tháng năm bình thường đi nào

      `expiration_date` đang ở dạng datetime mà `2021-09-04 17:00:00 UTC` Chuyển qua dạng ngày tháng năm bình thường đi nào
    • Mai Hoang Thai Ha @hamht

      changed this line in version 16 of the diff

      Aug 10, 2021

      changed this line in version 16 of the diff

      changed this line in [version 16 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5397&start_sha=a36e20ca6397bd443d379a690b3f1c21e1f87790#4f6f8650adc8fcba290a4f6bdab798db3c6df37e_72_81)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on the diff Aug 09, 2021
    Resolved by phuctmZigexn Aug 10, 2021
    app/views/jobs/show.html.slim 0 → 100644
    1 ruby:
    2 city_list = @job.cities
    3
    4 / html
    5 .container.my-5
    6 / breadcrumb
    7 .breadcrumb
    • phuctmZigexn @phuctm commented Aug 09, 2021
      Master

      phần breadcrumb này kinh khủng quá, đưa vào helper nha. Hạn chế để logic quá nhiều trên view. Hãy suy nghĩ điii

      phần breadcrumb này kinh khủng quá, đưa vào helper nha. Hạn chế để logic quá nhiều trên view. Hãy suy nghĩ điii
    Please register or sign in to reply
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • f3cf955b - fixed view

    Compare with previous version

    Aug 10, 2021

    added 1 commit

    • f3cf955b - fixed view

    Compare with previous version

    added 1 commit * f3cf955b - fixed view [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5397&start_sha=a36e20ca6397bd443d379a690b3f1c21e1f87790)
    Toggle commit list
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 10, 2021
    Resolved by Mai Hoang Thai Ha Aug 10, 2021
    app/views/jobs/show.html.slim 0 → 100644
    31
    32 / job details
    33 .job-detail.my5
    34 .job-apply.d-flex.align-items-center.justify-content-between
    35 h2.align-items-start
    36 = @job.title
    37 = link_to 'Apply for this job', '#', class: 'btn btn-primary'
    38 p.text-secondary
    39 = @job.company.name
    40 .row.bg-light
    41 .col-4
    42 ul.list-unstyled
    43 li
    44 strong.d-block
    45 | Location
    46 - city_list = @job.cities
    • phuctmZigexn @phuctm commented Aug 10, 2021
      Master

      - city_list = @job.cities cái này em chuyển lên trên cùng rồi mà chỗ này chưa xóa nè

      `- city_list = @job.cities` cái này em chuyển lên trên cùng rồi mà chỗ này chưa xóa nè
    • Mai Hoang Thai Ha @hamht

      changed this line in version 17 of the diff

      Aug 10, 2021

      changed this line in version 17 of the diff

      changed this line in [version 17 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5398&start_sha=f3cf955b7affe9a44481b4abd0898190f441712e#4f6f8650adc8fcba290a4f6bdab798db3c6df37e_46_34)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 10, 2021
    Resolved by Mai Hoang Thai Ha Aug 10, 2021
    app/views/jobs/index.html.slim 0 → 100644
    9 .page-info.p-2
    10 = page_entries_info @jobs
    11 .page-info.p-2
    12 = paginate @jobs
    13 .container
    14 .container
    15 - @jobs.each do |job|
    16 / job
    17 .job-item
    18 = link_to job.title, job, class: 'job-title fs-3 text-decoration-none text-reset'
    19 .job-caption
    20 = link_to job.company.name, '#', class: 'job-company text-decoration-none text-secondary'
    21 p.job-salary.text-success
    22 | Salary: #{job.salary}
    23 ul.list-unstyled
    24 - city_list = job.cities
    • phuctmZigexn @phuctm commented Aug 10, 2021
      Master
      - city_list = job.cities
      - city_list.each_with_index do |city, i|
        span
          = city.name
          - if i != city_list.length - 1
            span.mx-1 
              | |

      Đoạn này em xử lý gì phức tạp vậy. Anh sử dụng 2 methods là ra được nha.

      ```slim - city_list = job.cities - city_list.each_with_index do |city, i| span = city.name - if i != city_list.length - 1 span.mx-1 | | ``` Đoạn này em xử lý gì phức tạp vậy. Anh sử dụng 2 methods là ra được nha.
    • Mai Hoang Thai Ha @hamht

      changed this line in version 18 of the diff

      Aug 10, 2021

      changed this line in version 18 of the diff

      changed this line in [version 18 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5400&start_sha=7204d6e1babb3b43382930ef2c5abc1d22d25322#7aab1963773242ab7021ef6dba7810758f4405eb_24_24)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 10, 2021
    Resolved by Mai Hoang Thai Ha Aug 10, 2021
    app/views/jobs/show.html.slim 0 → 100644
    1 ruby:
    2 city_list = @job.cities
    3 industry_list = @job.industries
    4
    5 / html
    6 .container.my-5
    7 / breadcrumb
    8 .breadcrumb
    9 = link_to root_path, class: 'text-decoration-none text-info' do
    • phuctmZigexn @phuctm commented Aug 10, 2021
      Master
      = link_to root_path, class: 'text-decoration-none text-info' do
        'Home

      sao chỗ này em lại phải dùng block cho link_to

      https://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#method-i-link_to

      ``` = link_to root_path, class: 'text-decoration-none text-info' do 'Home ``` sao chỗ này em lại phải dùng block cho `link_to` https://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#method-i-link_to
    • Mai Hoang Thai Ha @hamht

      changed this line in version 17 of the diff

      Aug 10, 2021

      changed this line in version 17 of the diff

      changed this line in [version 17 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5398&start_sha=f3cf955b7affe9a44481b4abd0898190f441712e#4f6f8650adc8fcba290a4f6bdab798db3c6df37e_9_9)
      Toggle commit list
    Please register or sign in to reply
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • 7204d6e1 - add helper to display location and breadcrumb

    Compare with previous version

    Aug 10, 2021

    added 1 commit

    • 7204d6e1 - add helper to display location and breadcrumb

    Compare with previous version

    added 1 commit * 7204d6e1 - add helper to display location and breadcrumb [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5398&start_sha=f3cf955b7affe9a44481b4abd0898190f441712e)
    Toggle commit list
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 10, 2021
    Resolved by Mai Hoang Thai Ha Aug 10, 2021
    app/views/jobs/index.html.slim 0 → 100644
    10 = page_entries_info @jobs
    11 .page-info.p-2
    12 = paginate @jobs
    13 .container
    14 .container
    15 - @jobs.each do |job|
    16 / job
    17 .job-item
    18 = link_to job.title, job, class: 'job-title fs-3 text-decoration-none text-reset'
    19 .job-caption
    20 = link_to job.company.name, '#', class: 'job-company text-decoration-none text-secondary'
    21 p.job-salary.text-success
    22 | Salary: #{job.salary}
    23 ul.list-unstyled
    24 - city_list = job.cities
    25 = show_location(city_list)
    • phuctmZigexn @phuctm commented Aug 10, 2021
      Master

      = show_location(city_list)

      sao em ko bỏ job.cities vào luôn, city_list chỉ có 1 chỗ này dùng thôi

      `= show_location(city_list)` sao em ko bỏ `job.cities` vào luôn, city_list chỉ có 1 chỗ này dùng thôi
    • Mai Hoang Thai Ha @hamht

      changed this line in version 18 of the diff

      Aug 10, 2021

      changed this line in version 18 of the diff

      changed this line in [version 18 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5400&start_sha=7204d6e1babb3b43382930ef2c5abc1d22d25322#7aab1963773242ab7021ef6dba7810758f4405eb_25_24)
      Toggle commit list
    Please register or sign in to reply
  • Mai Hoang Thai Ha @hamht

    resolved all discussions

    Aug 10, 2021

    resolved all discussions

    resolved all discussions
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    resolved all discussions

    Aug 10, 2021

    resolved all discussions

    resolved all discussions
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • 9d46edb2 - fixed n+1 query jobs#index

    Compare with previous version

    Aug 10, 2021

    added 1 commit

    • 9d46edb2 - fixed n+1 query jobs#index

    Compare with previous version

    added 1 commit * 9d46edb2 - fixed n+1 query jobs#index [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5400&start_sha=7204d6e1babb3b43382930ef2c5abc1d22d25322)
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • bdda7391 - fix method sort_by_date

    Compare with previous version

    Aug 10, 2021

    added 1 commit

    • bdda7391 - fix method sort_by_date

    Compare with previous version

    added 1 commit * bdda7391 - fix method sort_by_date [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5401&start_sha=9d46edb25e09741e409ff618c5ab4bdd8ca4b12e)
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • f2e311ea - fixed sort_by_date method query

    Compare with previous version

    Aug 10, 2021

    added 1 commit

    • f2e311ea - fixed sort_by_date method query

    Compare with previous version

    added 1 commit * f2e311ea - fixed sort_by_date method query [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/10/diffs?diff_id=5402&start_sha=bdda739118d94216547a059e154694953f0dc106)
    Toggle commit list
  • phuctmZigexn @phuctm

    mentioned in commit c2fd5587

    Aug 10, 2021

    mentioned in commit c2fd5587

    mentioned in commit c2fd5587ad58a850cb094a1271859005d92acdd7
    Toggle commit list
  • phuctmZigexn @phuctm

    merged

    Aug 10, 2021

    merged

    merged
    Toggle commit list
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment
Assignee
No assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
2
2 participants
Reference: hamht/VenJob!10
×

Revert this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.
×

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.