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
  • Huỳnh Thiên Phước
  • venjob
  • Merge Requests
  • !8

Merged
Opened Aug 14, 2020 by Huỳnh Thiên Phước@phuocht 
  • Report abuse
Report abuse

User login

×

Check out, review, and merge locally

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

git fetch origin
git checkout -b user_login origin/user_login

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 user_login

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 13
  • Commits 15
  • Pipelines 21
  • Changes 24
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 14, 2020
    Last updated by Huỳnh Thiên Phước Aug 14, 2020
    app/views/users/my_page.html.erb 0 → 100644
    1 <div class="container">
    2 <%= render 'layouts/flash' %>
    3 <h1 class="text-center my-page-label">My Page</h1>
    4 <div class="form-login">
    5 <div class="row form d-flex justify-content-center">
    6 <%= form_for(@user) do |f| %>
    • Van Hau Le @haulv commented Aug 14, 2020
      Master

      @phuocht thử dùng current_user ở đây luộn được ko?

      @phuocht thử dùng current_user ở đây luộn được ko?
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 3 of the diff

      Aug 14, 2020

      changed this line in version 3 of the diff

      changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/8/diffs?diff_id=5068&start_sha=1a0017dc693485a59e861f605724ad5147589a1d#cc864691e615af6dae3fa494632fb845d0a84d6b_6_6)
      Toggle commit list
    Please register or sign in to reply
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 14, 2020
    Last updated by Huỳnh Thiên Phước Aug 14, 2020
    app/controllers/users_controller.rb 0 → 100644
    1 class UsersController < ApplicationController
    2 before_action :signed_in_user, only: [:update, :my_page, :my_info]
    3 def my_page
    4 @user = User.find(current_user.id)
    • Van Hau Le @haulv commented Aug 14, 2020
      Master

      @phuocht có user rồi đi find làm gì nữa em?

      @phuocht có user rồi đi find làm gì nữa em?
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 2 of the diff

      Aug 14, 2020

      changed this line in version 2 of the diff

      changed this line in [version 2 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/8/diffs?diff_id=5067&start_sha=02e124be3808f802fa298d6cca8758a9beda3411#28f48e0bc2718ddf87752d15b58a0016c13baf1c_4_4)
      Toggle commit list
    Please register or sign in to reply
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 14, 2020
    Last updated by Huỳnh Thiên Phước Aug 14, 2020
    app/controllers/users_controller.rb 0 → 100644
    1 class UsersController < ApplicationController
    2 before_action :signed_in_user, only: [:update, :my_page, :my_info]
    3 def my_page
    4 @user = User.find(current_user.id)
    5 end
    6
    7 def my_info
    8 @user = User.find(current_user.id)
    • Van Hau Le @haulv commented Aug 14, 2020
      Master

      @phuocht này cũng vậy

      @phuocht này cũng vậy
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 2 of the diff

      Aug 14, 2020

      changed this line in version 2 of the diff

      changed this line in [version 2 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/8/diffs?diff_id=5067&start_sha=02e124be3808f802fa298d6cca8758a9beda3411#28f48e0bc2718ddf87752d15b58a0016c13baf1c_8_8)
      Toggle commit list
    Please register or sign in to reply
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 1a0017dc - Fix update info

    Compare with previous version

    Aug 14, 2020

    added 1 commit

    • 1a0017dc - Fix update info

    Compare with previous version

    added 1 commit * 1a0017dc - Fix update info [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/8/diffs?diff_id=5067&start_sha=02e124be3808f802fa298d6cca8758a9beda3411)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 126a0b48 - Fix mentor's comment in controller

    Compare with previous version

    Aug 14, 2020

    added 1 commit

    • 126a0b48 - Fix mentor's comment in controller

    Compare with previous version

    added 1 commit * 126a0b48 - Fix mentor&#x27;s comment in controller [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/8/diffs?diff_id=5068&start_sha=1a0017dc693485a59e861f605724ad5147589a1d)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • aaab73c8 - Fix my page, filtered password

    Compare with previous version

    Aug 17, 2020

    added 1 commit

    • aaab73c8 - Fix my page, filtered password

    Compare with previous version

    added 1 commit * aaab73c8 - Fix my page, filtered password [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/8/diffs?diff_id=5071&start_sha=126a0b48dee006e4da20fdb48dfbca98e134d894)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 6492bb29 - Fix logic update form

    Compare with previous version

    Aug 17, 2020

    added 1 commit

    • 6492bb29 - Fix logic update form

    Compare with previous version

    added 1 commit * 6492bb29 - Fix logic update form [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/8/diffs?diff_id=5073&start_sha=aaab73c801cc743894b42834d4dff5a4962b8c13)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 02f91bdf - Fix logic update form

    Compare with previous version

    Aug 18, 2020

    added 1 commit

    • 02f91bdf - Fix logic update form

    Compare with previous version

    added 1 commit * 02f91bdf - Fix logic update form [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/8/diffs?diff_id=5075&start_sha=6492bb29f11a610867b81428ba2c7d914f59e176)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 28 commits

    • 02f91bdf...069f8180 - 27 commits from branch master
    • 98f21089 - Merge branch 'master' into 'user_login'

    Compare with previous version

    Aug 18, 2020

    added 28 commits

    • 02f91bdf...069f8180 - 27 commits from branch master
    • 98f21089 - Merge branch 'master' into 'user_login'

    Compare with previous version

    added 28 commits * 02f91bdf...069f8180 - 27 commits from branch `master` * 98f21089 - Merge branch &#x27;master&#x27; into &#x27;user_login&#x27; [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/8/diffs?diff_id=5076&start_sha=02f91bdfbfbbbc6a123c03f8eaadbf553c600f05)
    Toggle commit list
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 18, 2020
    Last updated by Huỳnh Thiên Phước Aug 18, 2020
    app/helpers/sessions_helper.rb 0 → 100644
    11 current_user.present?
    12 end
    13
    14 def current_user=(user)
    15 @current_user = user
    16 end
    17
    18 def current_user
    19 remember_token = User.digest(cookies[:remember_token])
    20 @current_user ||= User.find_by(remember_token: remember_token)
    21 end
    22
    23 def sign_out
    24 # current_user.update_attribute(:remember_token, User.digest(User.new_remember_token))
    25 cookies.delete(:remember_token)
    26 self.current_user = nil
    • Van Hau Le @haulv commented Aug 18, 2020
      Master

      @phuocht không reset remember token về nil hả em?

      @phuocht không reset remember token về nil hả em?
    • Huỳnh Thiên Phước @phuocht commented Aug 18, 2020
      Master

      dạ có a e để viết regex xong e gửi a PR

      dạ có a e để viết regex xong e gửi a PR
    Please register or sign in to reply
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 18, 2020
    app/helpers/sessions_helper.rb 0 → 100644
    3 def sign_in(user)
    4 remember_token = User.new_remember_token
    5 cookies.permanent[:remember_token] = remember_token
    6 user.update_attribute(:remember_token, User.digest(remember_token))
    7 self.current_user = user
    8 end
    9
    10 def signed_in?
    11 current_user.present?
    12 end
    13
    14 def current_user=(user)
    15 @current_user = user
    16 end
    17
    18 def current_user
    • Van Hau Le @haulv commented Aug 18, 2020
      Master

      @phuocht return nếu cookies[:remember_token] blank!

      @phuocht return nếu `cookies[:remember_token]` blank!
    Please register or sign in to reply
  • Huỳnh Thiên Phước @phuocht

    added 2 commits

    • 3d088347 - Fix secure in password
    • ed622ffa - cv do not

    Compare with previous version

    Aug 18, 2020

    added 2 commits

    • 3d088347 - Fix secure in password
    • ed622ffa - cv do not

    Compare with previous version

    added 2 commits * 3d088347 - Fix secure in password * ed622ffa - cv do not [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/8/diffs?diff_id=5078&start_sha=98f210893b78c0e6554feba3d9db65d1d0a8e7d4)
    Toggle commit list
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 18, 2020
    Last updated by Huỳnh Thiên Phước Aug 18, 2020
    app/models/user.rb
    5
    2 6 has_many :favorite_jobs
    3 7 has_many :jobs, through: :favorite_jobs
    4 8 has_many :job_applieds
    5 9 has_many :jobs, through: :job_applieds
    6 10 has_many :histories
    7 11 has_many :jobs, through: :histories
    12
    13 has_secure_password
    14
    15 validates :name, presence: true, length: { maximum: 50 }
    16 VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-]+(?:\.[a-z\d\-]+)*\.[a-z]+\z/i
    17 validates :email, presence: true, format: { with: VALID_EMAIL_REGEX },
    18 uniqueness: { case_sensitive: false }
    19
    20 validates :password, allow_nil: true, length: { minimum: 6, too_short: "is blank or too short" }
    • Van Hau Le @haulv commented Aug 18, 2020
      Master

      @phuocht password nil hả em?

      @phuocht password nil hả em?
    • Huỳnh Thiên Phước @phuocht commented Aug 18, 2020
      Master

      hôm wa e có nói đó a, do trong update form User ko cần phải nhập New password. Chỉ cần đúng oldpassword là được update rồi a

      hôm wa e có nói đó a, do trong update form User ko cần phải nhập New password. Chỉ cần đúng oldpassword là được update rồi a
    Please register or sign in to reply
  • Huỳnh Thiên Phước @phuocht

    added 28 commits

    • ed622ffa...069f8180 - 27 commits from branch master
    • d0a30db4 - Merge branch 'master' into 'user_login'

    Compare with previous version

    Aug 18, 2020

    added 28 commits

    • ed622ffa...069f8180 - 27 commits from branch master
    • d0a30db4 - Merge branch 'master' into 'user_login'

    Compare with previous version

    added 28 commits * ed622ffa...069f8180 - 27 commits from branch `master` * d0a30db4 - Merge branch &#x27;master&#x27; into &#x27;user_login&#x27; [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/8/diffs?diff_id=5079&start_sha=ed622ffa7cc8bf9146bdfdddc4e354eec69ae28b)
    Toggle commit list
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 18, 2020
    Last updated by Huỳnh Thiên Phước Aug 18, 2020
    app/models/user.rb
    7 11 has_many :jobs, through: :histories
    12
    13 has_secure_password
    14
    15 validates :name, presence: true, length: { maximum: 50 }
    16 VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-]+(?:\.[a-z\d\-]+)*\.[a-z]+\z/i
    17 validates :email, presence: true, format: { with: VALID_EMAIL_REGEX },
    18 uniqueness: { case_sensitive: false }
    19
    20 validates :password, allow_nil: true, length: { minimum: 6, too_short: "is blank or too short" }
    21
    22 def self.new_remember_token
    23 SecureRandom.urlsafe_base64
    24 end
    25
    26 def User.digest(token)
    • Van Hau Le @haulv commented Aug 18, 2020
      Master

      @phuocht update đồng bộ nha e

      @phuocht update đồng bộ nha e
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 10 of the diff

      Aug 18, 2020

      changed this line in version 10 of the diff

      changed this line in [version 10 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/8/diffs?diff_id=5080&start_sha=d0a30db4e332fbc8dc44b8e7f934979dd822ae12#4ed0c03b53dbc8320da88e7887465514cd9e90a4_27_27)
      Toggle commit list
    Please register or sign in to reply
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 18, 2020
    Last updated by Huỳnh Thiên Phước Aug 18, 2020
    app/models/user.rb
    7 11 has_many :jobs, through: :histories
    12
    13 has_secure_password
    14
    15 validates :name, presence: true, length: { maximum: 50 }
    16 VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-]+(?:\.[a-z\d\-]+)*\.[a-z]+\z/i
    17 validates :email, presence: true, format: { with: VALID_EMAIL_REGEX },
    18 uniqueness: { case_sensitive: false }
    19
    20 validates :password, allow_nil: true, length: { minimum: 6, too_short: "is blank or too short" }
    21
    22 def self.new_remember_token
    23 SecureRandom.urlsafe_base64
    24 end
    25
    26 def User.digest(token)
    • Van Hau Le @haulv commented Aug 18, 2020
      Master

      @phuocht update đồng bộ nha e

      @phuocht update đồng bộ nha e
    • Huỳnh Thiên Phước @phuocht commented Aug 18, 2020
      Master

      dạ a e fix mấy comment xong e gửi lại nãy h e fix regex của password

      dạ a e fix mấy comment xong e gửi lại nãy h e fix regex của password
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 10 of the diff

      Aug 18, 2020

      changed this line in version 10 of the diff

      changed this line in [version 10 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/8/diffs?diff_id=5080&start_sha=d0a30db4e332fbc8dc44b8e7f934979dd822ae12#4ed0c03b53dbc8320da88e7887465514cd9e90a4_27_27)
      Toggle commit list
    Please register or sign in to reply
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 0ce58138 - fix mentor's comment 2

    Compare with previous version

    Aug 18, 2020

    added 1 commit

    • 0ce58138 - fix mentor's comment 2

    Compare with previous version

    added 1 commit * 0ce58138 - fix mentor&#x27;s comment 2 [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/8/diffs?diff_id=5080&start_sha=d0a30db4e332fbc8dc44b8e7f934979dd822ae12)
    Toggle commit list
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 18, 2020
    Last updated by Huỳnh Thiên Phước Aug 18, 2020
    config/routes.rb
    1 1 Rails.application.routes.draw do
    2 2 # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
    3
    4 resources :users
    5 resources :sessions, only: [:new, :create, :destroy]
    6 match '/my', to: 'users#my_page', via: 'get', as: :my_page
    • Van Hau Le @haulv commented Aug 18, 2020
      Master

      @phuocht thử ngắn gọn vầy được không Phước?

      get '/my', to: 'users#my_page', as: :my_page
      @phuocht thử ngắn gọn vầy được không Phước? ```ruby get '/my', to: 'users#my_page', as: :my_page ```
    • Huỳnh Thiên Phước @phuocht commented Aug 18, 2020
      Master

      dạ được a ơi, v. e sửa lại mấy cái a

      dạ được a ơi, v. e sửa lại mấy cái a
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 14 of the diff

      Aug 18, 2020

      changed this line in version 14 of the diff

      changed this line in [version 14 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/8/diffs?diff_id=5084&start_sha=d6a7da13f9c46b8b125f403b609890ab62a812da#e801163eb9182955dca3eb9817d59af634f6665d_6_6)
      Toggle commit list
    Please register or sign in to reply
  • Huỳnh Thiên Phước @phuocht

    added 28 commits

    • 0ce58138...069f8180 - 27 commits from branch master
    • ff926afe - Merge branch 'master' into 'user_login'

    Compare with previous version

    Aug 18, 2020

    added 28 commits

    • 0ce58138...069f8180 - 27 commits from branch master
    • ff926afe - Merge branch 'master' into 'user_login'

    Compare with previous version

    added 28 commits * 0ce58138...069f8180 - 27 commits from branch `master` * ff926afe - Merge branch &#x27;master&#x27; into &#x27;user_login&#x27; [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/8/diffs?diff_id=5081&start_sha=0ce5813844a0e6aa6dd482bae89f759e39e901b4)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 28 commits

    • 0ce58138...069f8180 - 27 commits from branch master
    • d6a7da13 - Merge branch 'master' into 'user_login'

    Compare with previous version

    Aug 18, 2020

    added 28 commits

    • 0ce58138...069f8180 - 27 commits from branch master
    • d6a7da13 - Merge branch 'master' into 'user_login'

    Compare with previous version

    added 28 commits * 0ce58138...069f8180 - 27 commits from branch `master` * d6a7da13 - Merge branch &#x27;master&#x27; into &#x27;user_login&#x27; [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/8/diffs?diff_id=5083&start_sha=0ce5813844a0e6aa6dd482bae89f759e39e901b4)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 771ad7d0 - Fix routes

    Compare with previous version

    Aug 18, 2020

    added 1 commit

    • 771ad7d0 - Fix routes

    Compare with previous version

    added 1 commit * 771ad7d0 - Fix routes [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/8/diffs?diff_id=5084&start_sha=d6a7da13f9c46b8b125f403b609890ab62a812da)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 4a1c68f8 - Fix logic password, new_password

    Compare with previous version

    Aug 18, 2020

    added 1 commit

    • 4a1c68f8 - Fix logic password, new_password

    Compare with previous version

    added 1 commit * 4a1c68f8 - Fix logic password, new_password [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/8/diffs?diff_id=5085&start_sha=771ad7d05d41d02b5f0d928402a1fab1320c9a61)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 28 commits

    • 4a1c68f8...069f8180 - 27 commits from branch master
    • 20b078ef - Merge branch 'master' into 'user_login'

    Compare with previous version

    Aug 18, 2020

    added 28 commits

    • 4a1c68f8...069f8180 - 27 commits from branch master
    • 20b078ef - Merge branch 'master' into 'user_login'

    Compare with previous version

    added 28 commits * 4a1c68f8...069f8180 - 27 commits from branch `master` * 20b078ef - Merge branch &#x27;master&#x27; into &#x27;user_login&#x27; [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/8/diffs?diff_id=5086&start_sha=4a1c68f8acd99101c27a57706b46e00961c89b6b)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • f940275d - Change text html

    Compare with previous version

    Aug 18, 2020

    added 1 commit

    • f940275d - Change text html

    Compare with previous version

    added 1 commit * f940275d - Change text html [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/8/diffs?diff_id=5088&start_sha=20b078eff13d4066ba20f47a77869ca19f606982)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 28 commits

    • f940275d...069f8180 - 27 commits from branch master
    • c17a3ae9 - Merge branch 'master' into 'user_login'

    Compare with previous version

    Aug 18, 2020

    added 28 commits

    • f940275d...069f8180 - 27 commits from branch master
    • c17a3ae9 - Merge branch 'master' into 'user_login'

    Compare with previous version

    added 28 commits * f940275d...069f8180 - 27 commits from branch `master` * c17a3ae9 - Merge branch &#x27;master&#x27; into &#x27;user_login&#x27; [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/8/diffs?diff_id=5089&start_sha=f940275d02cc2e0dfc1c210abfb728e9b8b4396a)
    Toggle commit list
  • Van Hau Le @haulv

    mentioned in commit bcb71cf9

    Aug 18, 2020

    mentioned in commit bcb71cf9

    mentioned in commit bcb71cf9299325162a7e0f14c2d15e21e6b4162d
    Toggle commit list
  • Van Hau Le @haulv

    merged

    Aug 18, 2020

    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: phuocht/venjob!8
×

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.