Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
S
sample_app
  • 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
  • sample_app
  • Merge Requests
  • !14

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

Add password reset

×

Check out, review, and merge locally

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

git fetch origin
git checkout -b password-reset origin/password-reset

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 password-reset

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 17
  • Commits 3
  • Pipelines 3
  • Changes 19
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Thanh Hung Pham
    @hungpt started a discussion on an old version of the diff Jun 28, 2021
    Resolved by Nguyen Hoang Mai Phuong Jun 28, 2021
    app/controllers/users_controller.rb
    6 6 before_action :admin_user, only: :destroy
    7 7
    8 8 def show
    9 @user = User.find(params[:id])
    9 @user = User. find(params[:id] )
    • Thanh Hung Pham @hungpt commented Jun 28, 2021
      Master

      @phuongnhm có space ở giữa User. find(params[:id] )

      @phuongnhm có space ở giữa `User. find(params[:id] )`
    • Nguyen Hoang Mai Phuong @phuongnhm

      changed this line in version 2 of the diff

      Jun 28, 2021

      changed this line in version 2 of the diff

      changed this line in [version 2 of the diff](https://gitlab.zigexn.vn/phuongnhm/sample_app/merge_requests/14/diffs?diff_id=5291&start_sha=bc83113d670f372d1445e4a2bd5c74efcd15fbd9#28f48e0bc2718ddf87752d15b58a0016c13baf1c_9_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 Jun 28, 2021
    Resolved by Nguyen Hoang Mai Phuong Jun 28, 2021
    app/controllers/users_controller.rb
    6 6 before_action :admin_user, only: :destroy
    7 7
    8 8 def show
    9 @user = User.find(params[:id])
    9 @user = User. find(params[:id] )
    10 redirect_to root_url and return unless true
    10 11 end
    11 12
    12 13 def index
    13 @users = User.where(activated: FILL_IN).paginate(page: params[:page])
    14 @users = User. where(activated: true) . paginate(page: params[:page] )
    • Thanh Hung Pham @hungpt commented Jun 28, 2021
      Master

      @phuongnhm Tương tự User. find(params[:id] )

      @phuongnhm Tương tự `User. find(params[:id] )`
    • Nguyen Hoang Mai Phuong @phuongnhm

      changed this line in version 2 of the diff

      Jun 28, 2021

      changed this line in version 2 of the diff

      changed this line in [version 2 of the diff](https://gitlab.zigexn.vn/phuongnhm/sample_app/merge_requests/14/diffs?diff_id=5291&start_sha=bc83113d670f372d1445e4a2bd5c74efcd15fbd9#28f48e0bc2718ddf87752d15b58a0016c13baf1c_14_14)
      Toggle commit list
    Please register or sign in to reply
  • Thanh Hung Pham
    @hungpt started a discussion on an old version of the diff Jun 28, 2021
    Resolved by Nguyen Hoang Mai Phuong Jun 28, 2021
    app/controllers/users_controller.rb
    42 43 end
    43 44 end
    44 45
    45 private
    46
    47 def user_params
    48 params.require(:user).permit(:name, :email, :password, :password_confirmation)
    49 end
    46 def destroy
    47 User.find(params[:id]).destroy
    48 flash[:success] = "User deleted"
    49 redirect_to users_url
    50 end
    51
    52 private
    • Thanh Hung Pham @hungpt commented Jun 28, 2021
      Master

      @phuongnhm private thụt vào 2 space nha em.

      @phuongnhm `private` thụt vào 2 space nha em.
    • Nguyen Hoang Mai Phuong @phuongnhm

      changed this line in version 2 of the diff

      Jun 28, 2021

      changed this line in version 2 of the diff

      changed this line in [version 2 of the diff](https://gitlab.zigexn.vn/phuongnhm/sample_app/merge_requests/14/diffs?diff_id=5291&start_sha=bc83113d670f372d1445e4a2bd5c74efcd15fbd9#28f48e0bc2718ddf87752d15b58a0016c13baf1c_52_52)
      Toggle commit list
    Please register or sign in to reply
  • Thanh Hung Pham
    @hungpt started a discussion on an old version of the diff Jun 28, 2021
    Resolved by Nguyen Hoang Mai Phuong Jun 28, 2021
    app/views/password_resets/edit.html.erb 0 → 100644
    1 <% provide(:title, 'Reset password') %>
    2 <h1>Reset password</h1>
    3
    4 <div class="row">
    5 <div class="col-md-6 offset-3">
    6 <%= form_with(model: @user, url: password_reset_path(params[:id]),
    7 local: true) do |f| %>
    • Thanh Hung Pham @hungpt commented Jun 28, 2021
      Master

      @phuongnhm chỗ này sao rớt xuống dòng vậy ?

      @phuongnhm chỗ này sao rớt xuống dòng vậy ?
    • Nguyen Hoang Mai Phuong @phuongnhm

      changed this line in version 2 of the diff

      Jun 28, 2021

      changed this line in version 2 of the diff

      changed this line in [version 2 of the diff](https://gitlab.zigexn.vn/phuongnhm/sample_app/merge_requests/14/diffs?diff_id=5291&start_sha=bc83113d670f372d1445e4a2bd5c74efcd15fbd9#f2060791972a109c80d6e3353e44c67de52af08c_7_6)
      Toggle commit list
    Please register or sign in to reply
  • Thanh Hung Pham
    @hungpt started a discussion on an old version of the diff Jun 28, 2021
    Resolved by Nguyen Hoang Mai Phuong Jun 28, 2021
    app/views/password_resets/new.html.erb 0 → 100644
    1 <% provide(:title, "Forgot password") %>
    2 <h1>Forgot password</h1>
    3
    4 <div class="row">
    5 <div class="col-md-6 offset-3">
    6 <%= form_with(url: password_resets_path, scope: :password_reset,
    7 local: true) do |f| %>
    • Thanh Hung Pham @hungpt commented Jun 28, 2021
      Master

      @phuongnhm Tương tự

      @phuongnhm Tương tự
    • Nguyen Hoang Mai Phuong @phuongnhm

      changed this line in version 2 of the diff

      Jun 28, 2021

      changed this line in version 2 of the diff

      changed this line in [version 2 of the diff](https://gitlab.zigexn.vn/phuongnhm/sample_app/merge_requests/14/diffs?diff_id=5291&start_sha=bc83113d670f372d1445e4a2bd5c74efcd15fbd9#4f9247219548fea225284bd3fd82b78d0b3f0397_7_6)
      Toggle commit list
    Please register or sign in to reply
  • Thanh Hung Pham
    @hungpt started a discussion on an old version of the diff Jun 28, 2021
    Resolved by Nguyen Hoang Mai Phuong Jun 28, 2021
    app/views/user_mailer/password_reset.html.erb
    1 <h1>User#password_reset</h1>
    1 <h1>Password reset</h1>
    2
    3 <p>To reset your password click the link below:</p>
    4
    5 <%= link_to "Reset password", edit_password_reset_url(@user.reset_token,
    6 email: @user.email) %>
    • Thanh Hung Pham @hungpt commented Jun 28, 2021
      Master

      @phuongnhm Tương tự chỗ này bị rớt dòng

      @phuongnhm Tương tự chỗ này bị rớt dòng
    • Nguyen Hoang Mai Phuong @phuongnhm

      changed this line in version 2 of the diff

      Jun 28, 2021

      changed this line in version 2 of the diff

      changed this line in [version 2 of the diff](https://gitlab.zigexn.vn/phuongnhm/sample_app/merge_requests/14/diffs?diff_id=5291&start_sha=bc83113d670f372d1445e4a2bd5c74efcd15fbd9#50dfd636a91a6f5b6bcd4759f8006cb95f821d4f_6_5)
      Toggle commit list
    Please register or sign in to reply
  • Thanh Hung Pham
    @hungpt started a discussion on the diff Jun 28, 2021
    Resolved by Nguyen Hoang Mai Phuong Jun 28, 2021
    app/views/user_mailer/password_reset.html.erb
    1 <h1>User#password_reset</h1>
    1 <h1>Password reset</h1>
    2
    3 <p>To reset your password click the link below:</p>
    4
    5 <%= link_to "Reset password", edit_password_reset_url(@user.reset_token,
    6 email: @user.email) %>
    7 <p>This link will expire in two hours.</p>
    2 8
    3 9 <p>
    4 <%= @greeting %>, find me in app/views/user_mailer/password_reset.html.erb
    5 </p>
    10 If you did not request your password to be reset, please ignore this email and
    • Thanh Hung Pham @hungpt commented Jun 28, 2021
      Master

      @phuongnhm Text này phải thụt vào 2 space

      @phuongnhm Text này phải thụt vào 2 space
    Please register or sign in to reply
  • Thanh Hung Pham
    @hungpt started a discussion on the diff Jun 28, 2021
    Resolved by Nguyen Hoang Mai Phuong Jun 28, 2021
    app/views/user_mailer/password_reset.html.erb
    1 <h1>User#password_reset</h1>
    1 <h1>Password reset</h1>
    2
    3 <p>To reset your password click the link below:</p>
    4
    5 <%= link_to "Reset password", edit_password_reset_url(@user.reset_token,
    6 email: @user.email) %>
    7 <p>This link will expire in two hours.</p>
    2 8
    3 9 <p>
    4 <%= @greeting %>, find me in app/views/user_mailer/password_reset.html.erb
    5 </p>
    10 If you did not request your password to be reset, please ignore this email and
    • Thanh Hung Pham @hungpt commented Jun 28, 2021
      Master

      @phuongnhm Text này phải thụt vào 2 space

      @phuongnhm Text này phải thụt vào 2 space
    Please register or sign in to reply
  • Nguyen Hoang Mai Phuong @phuongnhm

    resolved all discussions

    Jun 28, 2021

    resolved all discussions

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

    added 1 commit

    • b747d7ba - fix style code

    Compare with previous version

    Jun 28, 2021

    added 1 commit

    • b747d7ba - fix style code

    Compare with previous version

    added 1 commit * b747d7ba - fix style code [Compare with previous version](https://gitlab.zigexn.vn/phuongnhm/sample_app/merge_requests/14/diffs?diff_id=5291&start_sha=bc83113d670f372d1445e4a2bd5c74efcd15fbd9)
    Toggle commit list
  • Thanh Hung Pham
    @hungpt started a discussion on an old version of the diff Jun 28, 2021
    Last updated by Nguyen Hoang Mai Phuong Jun 28, 2021
    app/views/user_mailer/password_reset.html.erb
    1 <h1>User#password_reset</h1>
    1 <h1>Password reset</h1>
    2
    3 <p>To reset your password click the link below:</p>
    4
    5 <%= link_to "Reset password", edit_password_reset_url(@user.reset_token, email:
    6 @user.email) %>
    • Thanh Hung Pham @hungpt commented Jun 28, 2021
      Master

      @phuongnhm sao cái này vẫn còn xuống dòng vậy em?

      @phuongnhm sao cái này vẫn còn xuống dòng vậy em?
    • Nguyen Hoang Mai Phuong @phuongnhm commented Jun 28, 2021
      Master

      abc

      ![abc](/uploads/512490883a81430f6a7fe18ebc121683/abc.png)
    • Nguyen Hoang Mai Phuong @phuongnhm commented Jun 28, 2021
      Master

      Em làm theo sách á anh

      Em làm theo sách á anh
    • Thanh Hung Pham @hungpt commented Jun 28, 2021
      Master

      @phuongnhm em nhìn xem cái email: của em nó nằm đâu ?

      @phuongnhm em nhìn xem cái `email:` của em nó nằm đâu ?
    • Nguyen Hoang Mai Phuong @phuongnhm commented Jun 28, 2021
      Master

      oh em xuống dòng nhầm tội lỗi tội lỗi

      oh em xuống dòng nhầm tội lỗi tội lỗi
    • Nguyen Hoang Mai Phuong @phuongnhm

      changed this line in version 3 of the diff

      Jun 28, 2021

      changed this line in version 3 of the diff

      changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/phuongnhm/sample_app/merge_requests/14/diffs?diff_id=5292&start_sha=b747d7bad44bc8cdc95ff7ea10f38f4a2e8355fb#50dfd636a91a6f5b6bcd4759f8006cb95f821d4f_6_5)
      Toggle commit list
    • Nguyen Hoang Mai Phuong @phuongnhm commented Jun 28, 2021
      Master

      Còn gì không anh

      Còn gì không anh
    Please register or sign in to reply
  • Thanh Hung Pham
    @hungpt started a discussion on the diff Jun 28, 2021
    Last updated by Thanh Hung Pham Jun 28, 2021
    app/models/micropost.rb 0 → 100644
    1 class Micropost < ApplicationRecord
    • Thanh Hung Pham @hungpt commented Jun 28, 2021
      Master

      @phuongnhm anh nhớ này ở chap 13 mà :))

      @phuongnhm anh nhớ này ở chap 13 mà :))
    • Nguyen Hoang Mai Phuong @phuongnhm commented Jun 28, 2021
      Master

      nãy em checkout qua chap 12 hem biết sao nó có luôn

      nãy em checkout qua chap 12 hem biết sao nó có luôn
    • Thanh Hung Pham @hungpt commented Jun 28, 2021
      Master

      @phuongnhm trước khi push code lên phải chạy git status xem code mình change những gì. Do em đang sửa code, khi em checkout qua nhánh khác, nó vẫn giữ code change đó,

      Từ giờ tập dùng git add từng file thôi, đừng dùng git add all nữa em.

      @phuongnhm trước khi push code lên phải chạy `git status` xem code mình change những gì. Do em đang sửa code, khi em checkout qua nhánh khác, nó vẫn giữ code change đó, Từ giờ tập dùng git add từng file thôi, đừng dùng git add all nữa em.
    Please register or sign in to reply
  • Nguyen Hoang Mai Phuong @phuongnhm

    added 1 commit

    • b638e4e6 - fix style code again

    Compare with previous version

    Jun 28, 2021

    added 1 commit

    • b638e4e6 - fix style code again

    Compare with previous version

    added 1 commit * b638e4e6 - fix style code again [Compare with previous version](https://gitlab.zigexn.vn/phuongnhm/sample_app/merge_requests/14/diffs?diff_id=5292&start_sha=b747d7bad44bc8cdc95ff7ea10f38f4a2e8355fb)
    Toggle commit list
  • Nguyen Hoang Mai Phuong @phuongnhm

    mentioned in commit 8bfd2938

    Jun 29, 2021

    mentioned in commit 8bfd2938

    mentioned in commit 8bfd29382876528aa2bdc743c724b56b40d9613c
    Toggle commit list
  • Nguyen Hoang Mai Phuong @phuongnhm

    merged

    Jun 29, 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/sample_app!14
×

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.