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.
-
Thanh Hung Pham@hungpt started a discussion on an old version of the diffResolved by Nguyen Hoang Mai Phuongapp/controllers/city_controller.rb 0 → 100644
1 class CityController < ApplicationController 2 def list_city 3 @city_vietnam = City.city_vietnam -
Thanh Hung Pham @hungpt commentedMasterEdited 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
@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
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 diffResolved by Thanh Hung Phamapp/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 commentedMasterEdited
@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
@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
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
-
-
Thanh Hung Pham@hungpt started a discussion on an old version of the diffResolved by Nguyen Hoang Mai Phuong
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 commentedMaster
Hai giá trị
1,2Move vào Model Region nha em.REGION_VN_ID = 1, REGION_INTERNATIONAL_ID = 2Hai scopes
city_vietnamvàcity_intercó nội dung giống nhau.Chỉ khác nhau ở
region_id = 1vàregion_id = 2Sử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
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
-
-
Thanh Hung Pham@hungpt started a discussion on an old version of the diffResolved by Nguyen Hoang Mai Phuongapp/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 commentedMasterEdited
@phuongnhm Sửa lại
Industries->Industry list. Giống với mô tả chi tiết nha em.@phuongnhm Sửa lại `Industries` -> `Industry list`. Giống với mô tả chi tiết nha em. -
Thanh Hung Pham @hungpt commentedMaster
-
Nguyen Hoang Mai Phuong @phuongnhm
changed this line in version 3 of the diff
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
-
-
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 commentedMaster
-
-
Thanh Hung Pham@hungpt started a discussion on an old version of the diffResolved by Thanh Hung Pham
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 commentedMasterEdited
@phuongnhm Cần define thêm 2 này chi vậy em?
resource :cities resource :industries@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
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
-
-
Thanh Hung Pham@hungpt started a discussion on an old version of the diffResolved by Nguyen Hoang Mai Phuong
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 commentedMaster
@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
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
-
-
Nguyen Hoang Mai Phuong @phuongnhm
added 1 commit
- cdbb0669 - fix page-ID2-ID3
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 diffResolved by Nguyen Hoang Mai Phuongapp/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 commentedMaster
@phuongnhm Sửa tên scope lại xíu nha em
cities_by_regioncho 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
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
-
-
Thanh Hung Pham@hungpt started a discussion on an old version of the diffResolved by Nguyen Hoang Mai Phuong
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 commentedMaster
@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/ - Dùng kiểu này nha em.
-
Nguyen Hoang Mai Phuong @phuongnhm
changed this line in version 3 of the diff
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
-
-
Nguyen Hoang Mai Phuong @phuongnhm
resolved all discussions
resolved all discussions
resolved all discussionsToggle commit list -
Nguyen Hoang Mai Phuong @phuongnhm
added 1 commit
- 86b7a4ee - fix page-ID2-ID3
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
mentioned in commit 5aa84058
mentioned in commit 5aa84058559cd6fb740c75b15d45a4a4f31934c4Toggle commit list -
Thanh Hung Pham @hungpt
merged
merged
mergedToggle commit list