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
  • Đường Sỹ Hoàng
  • sample_app
  • Merge Requests
  • !9

Merged
Opened Nov 19, 2019 by Đường Sỹ Hoàng@hoangds 
  • Report abuse
Report abuse

Updating users

×

Check out, review, and merge locally

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

git fetch origin
git checkout -b updating-users origin/updating-users

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 updating-users

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 21
  • Commits 18
  • Changes 22
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Son Do Hong
    @sondh started a discussion on an old version of the diff Nov 19, 2019
    Last updated by Đường Sỹ Hoàng Nov 19, 2019
    app/helpers/users_helper.rb
    1 1 module UsersHelper
    2 2 # Returns the Gravatar for the given user.
    3 def gravatar_for(user, size: 80)
    3 def gravatar_for(user,options={ size: 80})
    • Son Do Hong @sondh commented Nov 19, 2019
      Master

      coding convention

      coding convention
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 2 of the diff

      Nov 19, 2019

      changed this line in version 2 of the diff

      changed this line in [version 2 of the diff](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4332&start_sha=d62fc6cd2756b894a8cd4c266d2ad3a92c7328bf#eea85b20f9cc91cfbd0d5109cd9100bd9aab9f98_3_3)
      Toggle commit list
    Please register or sign in to reply
  • Son Do Hong
    @sondh started a discussion on an old version of the diff Nov 19, 2019
    Last updated by Đường Sỹ Hoàng Nov 19, 2019
    app/views/users/edit.html.erb 0 → 100644
    1 <!-- <% provide(:title, "Edit user") %>
    • Son Do Hong @sondh commented Nov 19, 2019
      Master

      không comment code, không dùng thì xóa đi

      không comment code, không dùng thì xóa đi
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 2 of the diff

      Nov 19, 2019

      changed this line in version 2 of the diff

      changed this line in [version 2 of the diff](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4332&start_sha=d62fc6cd2756b894a8cd4c266d2ad3a92c7328bf#f341a6263d9803e768a000b11a0a610ffacae2eb_1_1)
      Toggle commit list
    Please register or sign in to reply
  • Son Do Hong
    @sondh started a discussion on an old version of the diff Nov 19, 2019
    Last updated by Đường Sỹ Hoàng Nov 19, 2019
    app/views/users/edit.html.erb 0 → 100644
    10 <%= f.label :email %>
    11 <%= f.email_field :email, class: "form-control" %>
    12 <%= f.label :password %>
    13 <%= f.password_field :password, class: "form-control" %>
    14 <%= f.label :password_confirmation, "Confirmation" %>
    15 <%= f.password_field :password_confirmation, class: "form-control" %>
    16 <%= f.submit "Save changes", class: "btn btn-primary" %>
    17 <% end %>
    18
    19 <div class="gravatar_edit">
    20 <%= gravatar_for @user %>
    21 <a href="http://gravatar.com/emails" target="_blank">change</a>
    22 </div>
    23 </div>
    24 </div> -->
    25 <% provide(:title, 'Edit user') %>
    • Son Do Hong @sondh commented Nov 19, 2019
      Master

      double quote

      double quote
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 2 of the diff

      Nov 19, 2019

      changed this line in version 2 of the diff

      changed this line in [version 2 of the diff](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4332&start_sha=d62fc6cd2756b894a8cd4c266d2ad3a92c7328bf#f341a6263d9803e768a000b11a0a610ffacae2eb_25_6)
      Toggle commit list
    Please register or sign in to reply
  • Son Do Hong
    @sondh started a discussion on an old version of the diff Nov 19, 2019
    Last updated by Đường Sỹ Hoàng Nov 19, 2019
    app/views/users/new.html.erb
    1 <% provide(:title, "Sign up") %>
    1 <!-- <% provide(:title, "Sign up") %>
    • Son Do Hong @sondh commented Nov 19, 2019
      Master

      code không còn dùng đến thì xóa đi

      code không còn dùng đến thì xóa đi
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 5 of the diff

      Nov 19, 2019

      changed this line in version 5 of the diff

      changed this line in [version 5 of the diff](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4335&start_sha=0b5679e518842d5e54383f165aabd295f34802fb#0dad2ae568e6e543c7b3773f6343332c883889a4_1_1)
      Toggle commit list
    Please register or sign in to reply
  • Son Do Hong
    @sondh started a discussion on an old version of the diff Nov 19, 2019
    Last updated by Đường Sỹ Hoàng Nov 19, 2019
    db/seeds.rb
    1 # This file should contain all the record creation needed to seed the database with its default values.
    2 # The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
    3 #
    4 # Examples:
    5 #
    6 # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
    7 # Character.create(name: 'Luke', movie: movies.first)
    1 User.create!(name: "Example User",email: "example@railstutorial.org",password:"foobar",password_confirmation: "foobar",admin: true)
    • Son Do Hong @sondh commented Nov 19, 2019
      Master

      indent

      indent
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 6 of the diff

      Nov 19, 2019

      changed this line in version 6 of the diff

      changed this line in [version 6 of the diff](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4336&start_sha=e4cbd8cd0ea2327a732567be1eab2a5427bf85c9#816631bad3665c05f73dd7befe12c619677d6d62_1_1)
      Toggle commit list
    Please register or sign in to reply
  • Đường Sỹ Hoàng @hoangds

    added 1 commit

    • 820aefcf - Fixed indentaion&double quote

    Compare with previous version

    Nov 19, 2019

    added 1 commit

    • 820aefcf - Fixed indentaion&double quote

    Compare with previous version

    added 1 commit * 820aefcf - Fixed indentaion&amp;double quote [Compare with previous version](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4332&start_sha=d62fc6cd2756b894a8cd4c266d2ad3a92c7328bf)
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    added 1 commit

    • c965c4c8 - Fixed new line

    Compare with previous version

    Nov 19, 2019

    added 1 commit

    • c965c4c8 - Fixed new line

    Compare with previous version

    added 1 commit * c965c4c8 - Fixed new line [Compare with previous version](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4333&start_sha=820aefcf258ec2d49cf4e794e1bcc77087af2aed)
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    added 1 commit

    • 0b5679e5 - Fixed new line

    Compare with previous version

    Nov 19, 2019

    added 1 commit

    • 0b5679e5 - Fixed new line

    Compare with previous version

    added 1 commit * 0b5679e5 - Fixed new line [Compare with previous version](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4334&start_sha=c965c4c87446a16f12e9cbd0901263023673fa43)
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    added 1 commit

    • e4cbd8cd - Fixed indetation, double quote

    Compare with previous version

    Nov 19, 2019

    added 1 commit

    • e4cbd8cd - Fixed indetation, double quote

    Compare with previous version

    added 1 commit * e4cbd8cd - Fixed indetation, double quote [Compare with previous version](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4335&start_sha=0b5679e518842d5e54383f165aabd295f34802fb)
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    added 1 commit

    • 45b238af - Fixed identation

    Compare with previous version

    Nov 19, 2019

    added 1 commit

    • 45b238af - Fixed identation

    Compare with previous version

    added 1 commit * 45b238af - Fixed identation [Compare with previous version](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4336&start_sha=e4cbd8cd0ea2327a732567be1eab2a5427bf85c9)
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    added 1 commit

    • 7e7aaccc - Fixed new line

    Compare with previous version

    Nov 19, 2019

    added 1 commit

    • 7e7aaccc - Fixed new line

    Compare with previous version

    added 1 commit * 7e7aaccc - Fixed new line [Compare with previous version](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4337&start_sha=45b238af80b550cd70d7300fcf2b3753d591a5c3)
    Toggle commit list
  • Son Do Hong
    @sondh started a discussion on an old version of the diff Nov 19, 2019
    Last updated by Đường Sỹ Hoàng Nov 19, 2019
    db/seeds.rb
    1 # This file should contain all the record creation needed to seed the database with its default values.
    2 # The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
    3 #
    4 # Examples:
    5 #
    6 # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
    7 # Character.create(name: 'Luke', movie: movies.first)
    1 User.create!(name: "Example User", email: "example@railstutorial.org", password:"foobar", password_confirmation: "foobar")
    2 99.times do |n|
    3 name = Faker::Name.name
    4 email = "example-#{n+1}@railstutorial.org"
    5 password = "password"
    6 User.create!(name: name, email: email, password:password, password_confirmation: password)
    • Son Do Hong @sondh commented Nov 19, 2019
      Master

      indent

      indent
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 8 of the diff

      Nov 19, 2019

      changed this line in version 8 of the diff

      changed this line in [version 8 of the diff](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4338&start_sha=7e7aaccc6ae34e07267d7c372c8e7980285f23cc#816631bad3665c05f73dd7befe12c619677d6d62_6_7)
      Toggle commit list
    Please register or sign in to reply
  • Son Do Hong
    @sondh started a discussion on the diff Nov 19, 2019
    Resolved by Son Do Hong Nov 19, 2019
    db/seeds.rb
    1 # This file should contain all the record creation needed to seed the database with its default values.
    2 # The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
    3 #
    4 # Examples:
    5 #
    6 # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
    7 # Character.create(name: 'Luke', movie: movies.first)
    1 User.create!(name: "Example User", email: "example@railstutorial.org", password:"foobar", password_confirmation: "foobar")
    2 99.times do |n|
    • Son Do Hong @sondh commented Nov 19, 2019
      Master

      thêm 1 dòng trống trước dòng này

      thêm 1 dòng trống trước dòng này
    Please register or sign in to reply
  • Đường Sỹ Hoàng @hoangds

    added 1 commit

    • acbf37e4 - Fixed indetation& Space

    Compare with previous version

    Nov 19, 2019

    added 1 commit

    • acbf37e4 - Fixed indetation& Space

    Compare with previous version

    added 1 commit * acbf37e4 - Fixed indetation&amp; Space [Compare with previous version](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4338&start_sha=7e7aaccc6ae34e07267d7c372c8e7980285f23cc)
    Toggle commit list
  • Son Do Hong
    @sondh started a discussion on an old version of the diff Nov 19, 2019
    Last updated by Đường Sỹ Hoàng Nov 19, 2019
    test/integration/users_edit_test.rb 0 → 100644
    1 require "test_helper"
    2
    3 class UsersEditTest < ActionDispatch::IntegrationTest
    4
    5 def setup
    6 @user = users(:michael)
    7 end
    8
    9 test "unsuccessful edit" do
    10 log_in_as(@user)
    11 get edit_user_path(@user)
    12 assert_template "users/edit"
    13 patch user_path(@user), params: { user: { name: "",email: "foo@invalid",password: "foo",password_confirmation: "bar" } }
    • Son Do Hong @sondh commented Nov 19, 2019
      Master

      xem lại coding convention của toàn bộ file này, dấu space thiếu ở đâu, thừa ở đâu

      Edited Nov 19, 2019 by Son Do Hong
      xem lại coding convention của toàn bộ file này, dấu space thiếu ở đâu, thừa ở đâu
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 10 of the diff

      Nov 19, 2019

      changed this line in version 10 of the diff

      changed this line in [version 10 of the diff](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4340&start_sha=e20d4acadf755a613d940d0e67ac2a73ff7afefd#3fe424b855a5ec2fbf4bc81d57a14b6f8e68f79d_13_13)
      Toggle commit list
    Please register or sign in to reply
  • Son Do Hong
    @sondh started a discussion on an old version of the diff Nov 19, 2019
    Last updated by Đường Sỹ Hoàng Nov 19, 2019
    test/controllers/users_controller_test.rb
    27 log_in_as(@other_user)
    28 patch user_path(@user), params: { user: { name: @user.name,email: @user.email } }
    29 assert flash.empty?
    30 assert_redirected_to root_url
    31 end
    32
    33 test "should redirect update when not logged in" do
    34 patch user_path(@user), params: { user: { name: @user.name,email: @user.email } }
    35 assert_not flash.empty?
    36 assert_redirected_to login_url
    37 end
    38
    39 test "should not allow the admin attribute to be edited via the web" do
    40 log_in_as(@other_user)
    41 assert_not @other_user.admin?
    42 patch user_path(@other_user), params: {user:{ password: @other_user.password,password_confirmation: @other_user.password, admin: true } }
    • Son Do Hong @sondh commented Nov 19, 2019
      Master

      space với dấu { và dấu , không đúng

      space với dấu `{` và dấu `,` không đúng
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 10 of the diff

      Nov 19, 2019

      changed this line in version 10 of the diff

      changed this line in [version 10 of the diff](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4340&start_sha=e20d4acadf755a613d940d0e67ac2a73ff7afefd#78f0f134a1ced192ba8764883de478c536c57f98_42_42)
      Toggle commit list
    Please register or sign in to reply
  • Đường Sỹ Hoàng @hoangds

    added 1 commit

    • e20d4aca - Removed space

    Compare with previous version

    Nov 19, 2019

    added 1 commit

    • e20d4aca - Removed space

    Compare with previous version

    added 1 commit * e20d4aca - Removed space [Compare with previous version](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4339&start_sha=acbf37e4063af3435595aaf2caf7f3f8b5e71d7e)
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    added 1 commit

    • 66ea702f - Fixed space

    Compare with previous version

    Nov 19, 2019

    added 1 commit

    • 66ea702f - Fixed space

    Compare with previous version

    added 1 commit * 66ea702f - Fixed space [Compare with previous version](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4340&start_sha=e20d4acadf755a613d940d0e67ac2a73ff7afefd)
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    added 1 commit

    • 4cf15f35 - Fixed space

    Compare with previous version

    Nov 19, 2019

    added 1 commit

    • 4cf15f35 - Fixed space

    Compare with previous version

    added 1 commit * 4cf15f35 - Fixed space [Compare with previous version](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4341&start_sha=66ea702f5acde0d205f8d9baef83a769db764310)
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    added 1 commit

    • 68d3f4e3 - Fixed identation

    Compare with previous version

    Nov 19, 2019

    added 1 commit

    • 68d3f4e3 - Fixed identation

    Compare with previous version

    added 1 commit * 68d3f4e3 - Fixed identation [Compare with previous version](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4342&start_sha=4cf15f354b82a1cf2433b482b73cc817f4678156)
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    added 1 commit

    • 070c8332 - Removed space line

    Compare with previous version

    Nov 19, 2019

    added 1 commit

    • 070c8332 - Removed space line

    Compare with previous version

    added 1 commit * 070c8332 - Removed space line [Compare with previous version](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4343&start_sha=68d3f4e3e5ab195d52f2c1551faaafd1772a8ca3)
    Toggle commit list
  • Son Do Hong
    @sondh started a discussion on an old version of the diff Nov 19, 2019
    Last updated by Đường Sỹ Hoàng Nov 19, 2019
    test/integration/users_edit_test.rb 0 → 100644
    22 email = "foo@bar.com"
    23 patch user_path(@user), params: { user: { name: name, email: email, password: "", password_confirmation: "" } }
    24 assert_not flash.empty?
    25 assert_redirected_to @user
    26 @user.reload
    27 assert_equal name, @user.name
    28 assert_equal email, @user.email
    29 end
    30
    31 test "successful edit with friendly forwarding" do
    32 get edit_user_path(@user)
    33 log_in_as(@user)
    34 assert_redirected_to edit_user_url(@user)
    35 name = "Foo Bar"
    36 email = "foo@bar.com"
    37 patch user_path(@user), params: { user: { name: name, email: email, password:"", password_confirmation: "" } }
    • Son Do Hong @sondh commented Nov 19, 2019
      Master

      vẫn thiếu space

      vẫn thiếu space
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 14 of the diff

      Nov 19, 2019

      changed this line in version 14 of the diff

      changed this line in [version 14 of the diff](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4345&start_sha=070c8332754b94feab01c740c57abb871b1aef70#3fe424b855a5ec2fbf4bc81d57a14b6f8e68f79d_37_37)
      Toggle commit list
    Please register or sign in to reply
  • Son Do Hong
    @sondh started a discussion on an old version of the diff Nov 19, 2019
    Last updated by Đường Sỹ Hoàng Nov 19, 2019
    test/controllers/users_controller_test.rb
    27 log_in_as(@other_user)
    28 patch user_path(@user), params: { user: { name: @user.name, email: @user.email } }
    29 assert flash.empty?
    30 assert_redirected_to root_url
    31 end
    32
    33 test "should redirect update when not logged in" do
    34 patch user_path(@user), params: { user: { name: @user.name, email: @user.email } }
    35 assert_not flash.empty?
    36 assert_redirected_to login_url
    37 end
    38
    39 test "should not allow the admin attribute to be edited via the web" do
    40 log_in_as(@other_user)
    41 assert_not @other_user.admin?
    42 patch user_path(@other_user), params: {user:{ password: @other_user.password, password_confirmation: @other_user.password, admin: true } }
    • Son Do Hong @sondh commented Nov 19, 2019
      Master

      {user:{ => { user: {

      `{user:{` => `{ user: {`
    • Son Do Hong @sondh commented Nov 19, 2019
      Master

      đọc lại ruby style guide: https://github.com/rubocop-hq/ruby-style-guide#spaces-braces

      đọc lại ruby style guide: https://github.com/rubocop-hq/ruby-style-guide#spaces-braces
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 14 of the diff

      Nov 19, 2019

      changed this line in version 14 of the diff

      changed this line in [version 14 of the diff](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4345&start_sha=070c8332754b94feab01c740c57abb871b1aef70#78f0f134a1ced192ba8764883de478c536c57f98_42_42)
      Toggle commit list
    Please register or sign in to reply
  • Son Do Hong
    @sondh started a discussion on an old version of the diff Nov 19, 2019
    Last updated by Đường Sỹ Hoàng Nov 19, 2019
    db/seeds.rb
    2 # The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
    3 #
    4 # Examples:
    5 #
    6 # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
    7 # Character.create(name: 'Luke', movie: movies.first)
    1 User.create!(name: "Example User",
    2 email: "example@railstutorial.org",
    3 password: "foobar",
    4 password_confirmation: "foobar")
    5
    6 99.times do |n|
    7 name = Faker::Name.name
    8 email = "example-#{n+1}@railstutorial.org"
    9 password = "password"
    10 User.create!(name: name,
    • Son Do Hong @sondh commented Nov 19, 2019
      Master

      dư space

      dư space
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 14 of the diff

      Nov 19, 2019

      changed this line in version 14 of the diff

      changed this line in [version 14 of the diff](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4345&start_sha=070c8332754b94feab01c740c57abb871b1aef70#816631bad3665c05f73dd7befe12c619677d6d62_10_10)
      Toggle commit list
    Please register or sign in to reply
  • Son Do Hong
    @sondh started a discussion on an old version of the diff Nov 19, 2019
    Last updated by Đường Sỹ Hoàng Nov 19, 2019
    db/seeds.rb
    1 # This file should contain all the record creation needed to seed the database with its default values.
    2 # The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
    3 #
    4 # Examples:
    5 #
    6 # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
    7 # Character.create(name: 'Luke', movie: movies.first)
    1 User.create!(name: "Example User",
    • Son Do Hong @sondh commented Nov 19, 2019
      Master

      dư 1 space

      dư 1 space
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 14 of the diff

      Nov 19, 2019

      changed this line in version 14 of the diff

      changed this line in [version 14 of the diff](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4345&start_sha=070c8332754b94feab01c740c57abb871b1aef70#816631bad3665c05f73dd7befe12c619677d6d62_1_1)
      Toggle commit list
    Please register or sign in to reply
  • Son Do Hong
    @sondh started a discussion on an old version of the diff Nov 19, 2019
    Last updated by Đường Sỹ Hoàng Nov 19, 2019
    app/views/users/new.html.erb
    3
    4 4 <div class="row">
    5 5 <div class="col-md-6 col-md-offset-3">
    6 <%= form_for(@user) do |f| %>
    7 <%= render "shared/error_messages" %>
    8 <%= f.label :name %>
    9 <%= f.text_field :name, class: "form-control" %>
    10 <%= f.label :email %>
    11 <%= f.email_field :email, class: "form-control" %>
    12 <%= f.label :password %>
    13 <%= f.password_field :password, class: "form-control" %>
    14 <%= f.label :password_confirmation, "Confirmation" %>
    15 <%= f.password_field :password_confirmation, class: "form-control" %>
    16 <%= f.submit "Create my account", class: "btn btn-primary" %>
    17 <% end %>
    6 <%= render 'form' %>
    • Son Do Hong @sondh commented Nov 19, 2019
      Master

      double quote

      double quote
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 14 of the diff

      Nov 19, 2019

      changed this line in version 14 of the diff

      changed this line in [version 14 of the diff](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4345&start_sha=070c8332754b94feab01c740c57abb871b1aef70#0dad2ae568e6e543c7b3773f6343332c883889a4_6_6)
      Toggle commit list
    Please register or sign in to reply
  • Son Do Hong
    @sondh started a discussion on an old version of the diff Nov 19, 2019
    Last updated by Đường Sỹ Hoàng Nov 19, 2019
    app/views/users/index.html.erb 0 → 100644
    1 <% provide(:title, 'All users') %>
    • Son Do Hong @sondh commented Nov 19, 2019
      Master

      double quote

      double quote
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 14 of the diff

      Nov 19, 2019

      changed this line in version 14 of the diff

      changed this line in [version 14 of the diff](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4345&start_sha=070c8332754b94feab01c740c57abb871b1aef70#eab56d002bf9bd5f65a4f88c6e0cd08a9ad74b0c_1_1)
      Toggle commit list
    Please register or sign in to reply
  • Son Do Hong
    @sondh started a discussion on an old version of the diff Nov 19, 2019
    Last updated by Đường Sỹ Hoàng Nov 19, 2019
    app/views/users/_user.html.erb 0 → 100644
    1 <li>
    2 <%= gravatar_for user, size: 50 %>
    3 <%= link_to user.name, user %>
    4 <% if current_user.admin? && !current_user?(user) %>
    5 | <%= link_to "delete", user, method: :delete,data: {confirm: "You sure?" } %>
    • Son Do Hong @sondh commented Nov 19, 2019
      Master

      Xem lại ruby style guide https://github.com/rubocop-hq/ruby-style-guide#spaces-braces

      Xem lại ruby style guide https://github.com/rubocop-hq/ruby-style-guide#spaces-braces
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 14 of the diff

      Nov 19, 2019

      changed this line in version 14 of the diff

      changed this line in [version 14 of the diff](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4345&start_sha=070c8332754b94feab01c740c57abb871b1aef70#548e615f123e03babcfd51ac655a28c7ae9a17f3_5_5)
      Toggle commit list
    Please register or sign in to reply
  • Son Do Hong
    @sondh started a discussion on the diff Nov 19, 2019
    Resolved by Son Do Hong Nov 19, 2019
    app/controllers/users_controller.rb
    1 1 class UsersController < ApplicationController
    2 before_action :logged_in_user, only: [:index, :edit, :update,:destroy]
    3 before_action :correct_user, only: [:edit, :update]
    4 before_action :admin_user, only: :destroy
    5 def index
    • Son Do Hong @sondh commented Nov 19, 2019
      Master

      thêm 1 dòng trống dưới before action

      thêm 1 dòng trống dưới before action
    Please register or sign in to reply
  • Son Do Hong
    @sondh started a discussion on an old version of the diff Nov 19, 2019
    Last updated by Đường Sỹ Hoàng Nov 19, 2019
    app/controllers/users_controller.rb
    1 1 class UsersController < ApplicationController
    2 before_action :logged_in_user, only: [:index, :edit, :update,:destroy]
    • Son Do Hong @sondh commented Nov 19, 2019
      Master

      https://github.com/rubocop-hq/ruby-style-guide#spaces-braces

      https://github.com/rubocop-hq/ruby-style-guide#spaces-braces
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 14 of the diff

      Nov 19, 2019

      changed this line in version 14 of the diff

      changed this line in [version 14 of the diff](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4345&start_sha=070c8332754b94feab01c740c57abb871b1aef70#28f48e0bc2718ddf87752d15b58a0016c13baf1c_2_2)
      Toggle commit list
    Please register or sign in to reply
  • Đường Sỹ Hoàng @hoangds

    added 1 commit

    • e7a49cd4 - Fixed coding styles

    Compare with previous version

    Nov 19, 2019

    added 1 commit

    • e7a49cd4 - Fixed coding styles

    Compare with previous version

    added 1 commit * e7a49cd4 - Fixed coding styles [Compare with previous version](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4345&start_sha=070c8332754b94feab01c740c57abb871b1aef70)
    Toggle commit list
  • Son Do Hong
    @sondh started a discussion on an old version of the diff Nov 19, 2019
    Last updated by Đường Sỹ Hoàng Nov 19, 2019
    app/assets/javascripts/account_activations.coffee 0 → 100644
    1 # Place all the behaviors and hooks related to the matching controller here.
    2 # All this logic will automatically be available in application.js.
    • Son Do Hong @sondh commented Nov 19, 2019
      Master

      file này ko liên quan đến chap này, xóa khỏi merge request

      file này ko liên quan đến chap này, xóa khỏi merge request
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 15 of the diff

      Nov 19, 2019

      changed this line in version 15 of the diff

      changed this line in [version 15 of the diff](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4346&start_sha=e7a49cd419f6a56da943b19b7f2602da32d8b6d9#84451baf3eab4bd50a9ce69e6738d6ae544d9185_2_0)
      Toggle commit list
    Please register or sign in to reply
  • Son Do Hong
    @sondh started a discussion on an old version of the diff Nov 19, 2019
    Last updated by Đường Sỹ Hoàng Nov 19, 2019
    app/assets/stylesheets/account_activations.scss 0 → 100644
    1 // Place all the styles related to the AccountActivations controller here.
    • Son Do Hong @sondh commented Nov 19, 2019
      Master

      file này ko liên quan đến chap này, xóa khỏi merge request

      file này ko liên quan đến chap này, xóa khỏi merge request
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 15 of the diff

      Nov 19, 2019

      changed this line in version 15 of the diff

      changed this line in [version 15 of the diff](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4346&start_sha=e7a49cd419f6a56da943b19b7f2602da32d8b6d9#961cf0d6c2f3a2d495fbd64fabfa5fced789e857_1_0)
      Toggle commit list
    Please register or sign in to reply
  • Đường Sỹ Hoàng @hoangds

    added 1 commit

    • cb2cd249 - Deleted unuse files

    Compare with previous version

    Nov 19, 2019

    added 1 commit

    • cb2cd249 - Deleted unuse files

    Compare with previous version

    added 1 commit * cb2cd249 - Deleted unuse files [Compare with previous version](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4346&start_sha=e7a49cd419f6a56da943b19b7f2602da32d8b6d9)
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    added 1 commit

    • ab752d64 - Deleted unuse files

    Compare with previous version

    Nov 19, 2019

    added 1 commit

    • ab752d64 - Deleted unuse files

    Compare with previous version

    added 1 commit * ab752d64 - Deleted unuse files [Compare with previous version](https://gitlab.zigexn.vn/hoangds/sample_app/merge_requests/9/diffs?diff_id=4347&start_sha=cb2cd249ded629b1b203e9f979250830ba04361b)
    Toggle commit list
  • Son Do Hong @sondh

    mentioned in commit 2d33396b

    Nov 19, 2019

    mentioned in commit 2d33396b

    mentioned in commit 2d33396be0785cf1c3a27f847f1dbd5d24dbf99b
    Toggle commit list
  • Son Do Hong @sondh

    merged

    Nov 19, 2019

    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
Son Do Hong
Assignee
Son Do Hong @sondh
Assign to
None
Milestone
None
Assign milestone
Time tracking
2
2 participants
Reference: hoangds/sample_app!9
×

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.