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
  • Nguyen Hoang Mai Phuong
  • VeNJOB
  • Merge Requests
  • !4

Merged
Opened Jul 28, 2021 by Nguyen Hoang Mai Phuong@phuongnhm 
  • Report abuse
Report abuse

page ID2/ID3

×

Check out, review, and merge locally

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

git fetch origin
git checkout -b page_ID2/ID3 origin/page_ID2/ID3

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 page_ID2/ID3

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 10
  • Commits 3
  • Pipelines 3
  • Changes 9
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Thanh Hung Pham
    @hungpt started a discussion on an old version of the diff Jul 28, 2021
    Resolved by Nguyen Hoang Mai Phuong Jul 29, 2021
    app/controllers/city_controller.rb 0 → 100644
    1 class CityController < ApplicationController
    2 def list_city
    3 @city_vietnam = City.city_vietnam
    • Thanh Hung Pham @hungpt commented Jul 28, 2021
      Master

      @phuongnhm Chỗ này nhiều city nên sửa biến lại

      • @cities_vietnam
      • Tương tự sửa lại tên scope luôn nha em
      Edited Jul 28, 2021 by Thanh Hung Pham
      @phuongnhm Chỗ này nhiều city nên sửa biến lại - `@cities_vietnam` - Tương tự sửa lại tên scope luôn nha em
    • Nguyen Hoang Mai Phuong @phuongnhm

      changed this line in version 2 of the diff

      Jul 29, 2021

      changed this line in version 2 of the diff

      changed this line in [version 2 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/4/diffs?diff_id=5378&start_sha=6441346633d35231a190677771bbf11704c845ab#6f89ae847bd6d0308ec7f27f1c31ca04892c5248_3_3)
      Toggle commit list
    Please register or sign in to reply
  • Thanh Hung Pham
    @hungpt started a discussion on an old version of the diff Jul 28, 2021
    Resolved by Thanh Hung Pham Jul 29, 2021
    app/controllers/city_controller.rb 0 → 100644
    1 class CityController < ApplicationController
    2 def list_city
    3 @city_vietnam = City.city_vietnam
    4 @city_inter = City.city_inter
    • Thanh Hung Pham @hungpt commented Jul 28, 2021
      Master

      @phuongnhm Chỗ này nhiều industry nên sửa biến lại, và sửa lại cho rõ ràng nha em

      • @cities_international
      • Tương tự sửa tên scope luôn nha em
      Edited Jul 29, 2021
      @phuongnhm Chỗ này nhiều industry nên sửa biến lại, và sửa lại cho rõ ràng nha em - `@cities_international` - Tương tự sửa tên scope luôn nha em
    • Nguyen Hoang Mai Phuong @phuongnhm

      changed this line in version 2 of the diff

      Jul 29, 2021

      changed this line in version 2 of the diff

      changed this line in [version 2 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/4/diffs?diff_id=5378&start_sha=6441346633d35231a190677771bbf11704c845ab#6f89ae847bd6d0308ec7f27f1c31ca04892c5248_4_3)
      Toggle commit list
    Please register or sign in to reply
  • Thanh Hung Pham
    @hungpt started a discussion on an old version of the diff Jul 28, 2021
    Resolved by Nguyen Hoang Mai Phuong Jul 29, 2021
    app/models/city.rb
    4 4 has_and_belongs_to_many :companies
    5 5 LATEST_CITY_NUMBER = 9
    6 6 scope :top_cities, -> { joins(:jobs).group(:name).order('count_all DESC').count.take(LATEST_CITY_NUMBER) }
    7 scope :city_vietnam, -> { joins(:jobs).group(:name).having('count_all >= ?', 1).where('region_id = 1').order('count_all DESC').count }
    • Thanh Hung Pham @hungpt commented Jul 28, 2021
      Master

      @phuongnhm

      • Hai giá trị 1,2 Move vào Model Region nha em. REGION_VN_ID = 1, REGION_INTERNATIONAL_ID = 2

      • Hai scopes city_vietnam và city_inter có nội dung giống nhau.

      • Chỉ khác nhau ở region_id = 1 và region_id = 2

      • Sửa lại thành 1 scope và truyền param vào. Tham khảo https://stackoverflow.com/questions/50663625/rails-scope-params

      @phuongnhm - Hai giá trị `1,2` Move vào Model Region nha em. `REGION_VN_ID = 1, REGION_INTERNATIONAL_ID = 2` - Hai scopes `city_vietnam` và `city_inter` có nội dung giống nhau. - Chỉ khác nhau ở `region_id = 1` và `region_id = 2` - Sửa lại thành 1 scope và truyền param vào. Tham khảo https://stackoverflow.com/questions/50663625/rails-scope-params
    • Nguyen Hoang Mai Phuong @phuongnhm

      changed this line in version 2 of the diff

      Jul 29, 2021

      changed this line in version 2 of the diff

      changed this line in [version 2 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/4/diffs?diff_id=5378&start_sha=6441346633d35231a190677771bbf11704c845ab#28495972e963898abf2919ffeaeb92fbdf49fb8e_7_9)
      Toggle commit list
    Please register or sign in to reply
  • Thanh Hung Pham
    @hungpt started a discussion on an old version of the diff Jul 28, 2021
    Resolved by Nguyen Hoang Mai Phuong Jul 30, 2021
    app/views/industry/list_industry.html.slim 0 → 100644
    1 - provide :title, 'Industries'
    2
    3 .container
    4 h3.p-3
    5 | Industries
    • Thanh Hung Pham @hungpt commented Jul 28, 2021
      Master

      @phuongnhm Sửa lại Industries -> Industry list. Giống với mô tả chi tiết nha em.

      Edited Jul 29, 2021
      @phuongnhm Sửa lại `Industries` -> `Industry list`. Giống với mô tả chi tiết nha em.
    • Thanh Hung Pham @hungpt commented Jul 29, 2021
      Master

      @phuongnhm chỗ này chưa fix nè em

      @phuongnhm chỗ này chưa fix nè em
    • Nguyen Hoang Mai Phuong @phuongnhm

      changed this line in version 3 of the diff

      Jul 30, 2021

      changed this line in version 3 of the diff

      changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/4/diffs?diff_id=5380&start_sha=cdbb0669c9963d9f3f002bfbdfb2ad1cdfb52842#b5915bee1a55137de94121c92908859747c22068_5_5)
      Toggle commit list
    Please register or sign in to reply
  • Thanh Hung Pham
    @hungpt started a discussion on the diff Jul 28, 2021
    Resolved by Thanh Hung Pham Jul 29, 2021
    app/views/layouts/_header.html.slim
    1 1 header
    2 2 nav.navbar.navbar-expand-lg.navbar-light.bg-dark
    3 3 .container-fluid
    4 = image_tag "logo.png", alt: "logo", id: "logo"
    4 = link_to (image_tag "logo.png", alt: "logo"), root_path, id: "logo"
    • Thanh Hung Pham @hungpt commented Jul 28, 2021
      Master

      @phuongnhm Plus point! :))

      Edited Jul 29, 2021
      @phuongnhm Plus point! :))
    Please register or sign in to reply
  • Thanh Hung Pham
    @hungpt started a discussion on an old version of the diff Jul 28, 2021
    Resolved by Thanh Hung Pham Jul 29, 2021
    config/routes.rb
    1 1 Rails.application.routes.draw do
    2 2 root 'top#home'
    3 end
    3 get '/cities', to: 'city#list_city'
    4 get '/industries', to: 'industry#list_industry'
    5 resource :cities
    • Thanh Hung Pham @hungpt commented Jul 28, 2021
      Master

      @phuongnhm Cần define thêm 2 này chi vậy em?

      resource :cities
      resource :industries
      Edited Jul 29, 2021
      @phuongnhm Cần define thêm 2 này chi vậy em? ``` resource :cities resource :industries ```
    • Nguyen Hoang Mai Phuong @phuongnhm

      changed this line in version 2 of the diff

      Jul 29, 2021

      changed this line in version 2 of the diff

      changed this line in [version 2 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/4/diffs?diff_id=5378&start_sha=6441346633d35231a190677771bbf11704c845ab#e801163eb9182955dca3eb9817d59af634f6665d_5_3)
      Toggle commit list
    Please register or sign in to reply
  • Thanh Hung Pham
    @hungpt started a discussion on an old version of the diff Jul 28, 2021
    Resolved by Nguyen Hoang Mai Phuong Jul 29, 2021
    config/routes.rb
    1 1 Rails.application.routes.draw do
    2 2 root 'top#home'
    3 end
    3 get '/cities', to: 'city#list_city'
    • Thanh Hung Pham @hungpt commented Jul 28, 2021
      Master

      @phuongnhm Mình có thể bỏ / nha em. Không cần thiết đâu

      @phuongnhm Mình có thể bỏ `/` nha em. Không cần thiết đâu
    • Nguyen Hoang Mai Phuong @phuongnhm

      changed this line in version 2 of the diff

      Jul 29, 2021

      changed this line in version 2 of the diff

      changed this line in [version 2 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/4/diffs?diff_id=5378&start_sha=6441346633d35231a190677771bbf11704c845ab#e801163eb9182955dca3eb9817d59af634f6665d_3_3)
      Toggle commit list
    Please register or sign in to reply
  • Nguyen Hoang Mai Phuong @phuongnhm

    added 1 commit

    • cdbb0669 - fix page-ID2-ID3

    Compare with previous version

    Jul 29, 2021

    added 1 commit

    • cdbb0669 - fix page-ID2-ID3

    Compare with previous version

    added 1 commit * cdbb0669 - fix page-ID2-ID3 [Compare with previous version](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/4/diffs?diff_id=5378&start_sha=6441346633d35231a190677771bbf11704c845ab)
    Toggle commit list
  • Thanh Hung Pham
    @hungpt started a discussion on an old version of the diff Jul 29, 2021
    Resolved by Nguyen Hoang Mai Phuong Jul 30, 2021
    app/controllers/city_controller.rb 0 → 100644
    1 class CityController < ApplicationController
    2 def list_city
    3 @cities_vietnam = City.cities(City::REGION_VN_ID)
    • Thanh Hung Pham @hungpt commented Jul 29, 2021
      Master

      @phuongnhm Sửa tên scope lại xíu nha em cities_by_region cho dễ hiểu :))

      @phuongnhm Sửa tên scope lại xíu nha em `cities_by_region` cho dễ hiểu :))
    • Nguyen Hoang Mai Phuong @phuongnhm

      changed this line in version 3 of the diff

      Jul 30, 2021

      changed this line in version 3 of the diff

      changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/4/diffs?diff_id=5380&start_sha=cdbb0669c9963d9f3f002bfbdfb2ad1cdfb52842#6f89ae847bd6d0308ec7f27f1c31ca04892c5248_3_3)
      Toggle commit list
    Please register or sign in to reply
  • Thanh Hung Pham
    @hungpt started a discussion on an old version of the diff Jul 29, 2021
    Resolved by Nguyen Hoang Mai Phuong Jul 30, 2021
    app/models/city.rb
    3 3 has_and_belongs_to_many :jobs
    4 4 has_and_belongs_to_many :companies
    5 5 LATEST_CITY_NUMBER = 9
    6 REGION_VN_ID = 1
    7 REGION_INTERNATIONAL_ID = 2
    6 8 scope :top_cities, -> { joins(:jobs).group(:name).order('count_all DESC').count.take(LATEST_CITY_NUMBER) }
    9 scope :cities, ->(value) { joins(:jobs).group(:name).having('count_all >= ?', 1).where("region_id = #{value}").order('count_all DESC').count }
    • Thanh Hung Pham @hungpt commented Jul 29, 2021
      Master

      @phuongnhm where("region_id = #{value}")

      • Dùng kiểu này nha em. where("region_id = ?", value)
      • Tránh bị lỗi security https://www.netsparker.com/blog/web-security/sql-injection-ruby-on-rails-development/
      @phuongnhm `where("region_id = #{value}")` - Dùng kiểu này nha em. `where("region_id = ?", value)` - Tránh bị lỗi security https://www.netsparker.com/blog/web-security/sql-injection-ruby-on-rails-development/
    • Nguyen Hoang Mai Phuong @phuongnhm

      changed this line in version 3 of the diff

      Jul 30, 2021

      changed this line in version 3 of the diff

      changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/4/diffs?diff_id=5380&start_sha=cdbb0669c9963d9f3f002bfbdfb2ad1cdfb52842#28495972e963898abf2919ffeaeb92fbdf49fb8e_9_9)
      Toggle commit list
    Please register or sign in to reply
  • Nguyen Hoang Mai Phuong @phuongnhm

    resolved all discussions

    Jul 30, 2021

    resolved all discussions

    resolved all discussions
    Toggle commit list
  • Nguyen Hoang Mai Phuong @phuongnhm

    added 1 commit

    • 86b7a4ee - fix page-ID2-ID3

    Compare with previous version

    Jul 30, 2021

    added 1 commit

    • 86b7a4ee - fix page-ID2-ID3

    Compare with previous version

    added 1 commit * 86b7a4ee - fix page-ID2-ID3 [Compare with previous version](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/4/diffs?diff_id=5380&start_sha=cdbb0669c9963d9f3f002bfbdfb2ad1cdfb52842)
    Toggle commit list
  • Thanh Hung Pham @hungpt

    mentioned in commit 5aa84058

    Jul 30, 2021

    mentioned in commit 5aa84058

    mentioned in commit 5aa84058559cd6fb740c75b15d45a4a4f31934c4
    Toggle commit list
  • Thanh Hung Pham @hungpt

    merged

    Jul 30, 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: phuongnhm/VeNJOB!4
×

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.