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 Ngoc Nghia
  • VeNJOB
  • Merge Requests
  • !19

Merged
Opened Jan 17, 2020 by Nguyen Ngoc Nghia@nghiann 
  • Report abuse
Report abuse

Feature/applied jobs

  • Check if user signed in or not before access to user/my_page.
  • Show all applied jobs of signed in user.

applied_jobs

×

Check out, review, and merge locally

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

git fetch origin
git checkout -b feature/applied_jobs origin/feature/applied_jobs

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 feature/applied_jobs

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 3
  • Commits 6
  • Changes 8
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Nguyen Ngoc Nghia @nghiann

    added 1 commit

    • d7f5a870 - using before_action find_user

    Compare with previous version

    Jan 17, 2020

    added 1 commit

    • d7f5a870 - using before_action find_user

    Compare with previous version

    added 1 commit * d7f5a870 - using before_action find_user [Compare with previous version](https://gitlab.zigexn.vn/nghiann/VeNJOB/merge_requests/19/diffs?diff_id=4673&start_sha=9c4f89167957942d285d87805d7e40858363fe00)
    Toggle commit list
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Feb 14, 2020
    Automatically resolved by Nguyen Ngoc Nghia with a push Feb 14, 2020
    app/controllers/jobs_controller.rb
    39 42 end
    40 43 end
    41 44
    45 def apply_available
    46 user_jobs.find_by(job_id: @job_id, user_id: @user.id)
    47 end
    48
    42 49 private
    43 50
    44 51 def confirm_apply_info_params
    45 52 params.require(:confirm_apply_info).permit(:job_id, :first_name, :last_name, :email)
    46 53 end
    54
    55 def find_user
    56 @user = User.fint_by(:id)
    • Van Hau Le @haulv commented Feb 14, 2020
      Master

      @nghiann find_by not fint_by

      @nghiann `find_by` not `fint_by`
    • Nguyen Ngoc Nghia @nghiann

      changed this line in version 3 of the diff

      Feb 14, 2020

      changed this line in version 3 of the diff

      changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/nghiann/VeNJOB/merge_requests/19/diffs?diff_id=4681&start_sha=d7f5a87023b92f4e959957a90133eca579564daf#6fa69a07843a58f190bf4d7e0692b9cc5b0bf52b_56_56)
      Toggle commit list
    Please register or sign in to reply
  • Nguyen Ngoc Nghia @nghiann

    resolved all discussions

    Feb 14, 2020

    resolved all discussions

    resolved all discussions
    Toggle commit list
  • Nguyen Ngoc Nghia @nghiann

    added 1 commit

    • 8467f3e0 - fix typos error

    Compare with previous version

    Feb 14, 2020

    added 1 commit

    • 8467f3e0 - fix typos error

    Compare with previous version

    added 1 commit * 8467f3e0 - fix typos error [Compare with previous version](https://gitlab.zigexn.vn/nghiann/VeNJOB/merge_requests/19/diffs?diff_id=4681&start_sha=d7f5a87023b92f4e959957a90133eca579564daf)
    Toggle commit list
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Feb 14, 2020
    Automatically resolved by Nguyen Ngoc Nghia with a push Feb 14, 2020
    app/controllers/users/my_pages_controller.rb
    1 1 class Users::MyPagesController < ApplicationController
    2 before_action :authenticate_user!, only: [:show, :applied_jobs]
    3
    2 4 def show
    3 5 end
    6
    7 def applied_jobs
    8 @applied_jobs = current_user.jobs.all.includes(:cities).decorate
    • Van Hau Le @haulv commented Feb 14, 2020
      Master

      @nghiann no need to use all attribute. @applied_jobs = current_user.jobs.includes(:cities).decorate

      @nghiann no need to use `all` attribute. `@applied_jobs = current_user.jobs.includes(:cities).decorate`
    • Nguyen Ngoc Nghia @nghiann

      changed this line in version 4 of the diff

      Feb 14, 2020

      changed this line in version 4 of the diff

      changed this line in [version 4 of the diff](https://gitlab.zigexn.vn/nghiann/VeNJOB/merge_requests/19/diffs?diff_id=4682&start_sha=8467f3e06759e4b36ad81af051e02df1a707f24e#b214c1840a38e8eee630c36cae77b84ceb6dbb80_8_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 Feb 14, 2020
    Automatically resolved by Nguyen Ngoc Nghia with a push Feb 14, 2020
    app/views/users/my_pages/show.html.erb
    6 6 <h3>My CV: <%= current_user.cv_path %></h3>
    7 7
    8 8 <%= link_to "Edit", edit_user_registration_path, class: "btn btn-lg btn-primary" %>
    9 <%= link_to "My jobs", "#", class: "btn btn-lg btn-primary" %>
    9 <%= link_to "My jobs", jobs_users_my_page_path, class: "btn btn-lg btn-primary" %>
    • Van Hau Le @haulv commented Feb 14, 2020
      Master

      @nghiann you should change jobs_users_my_page_path as an alias on routes file for meaning clearly! Such as applied_job_path or something like that!

      Edited Feb 14, 2020 by Van Hau Le
      @nghiann you should change `jobs_users_my_page_path` as an alias on routes file for meaning clearly! Such as `applied_job_path` or something like that!
    • Nguyen Ngoc Nghia @nghiann

      changed this line in version 4 of the diff

      Feb 14, 2020

      changed this line in version 4 of the diff

      changed this line in [version 4 of the diff](https://gitlab.zigexn.vn/nghiann/VeNJOB/merge_requests/19/diffs?diff_id=4682&start_sha=8467f3e06759e4b36ad81af051e02df1a707f24e#b045bccf8e54d1161422e8ab78e62e73fd446ea8_9_9)
      Toggle commit list
    Please register or sign in to reply
  • Nguyen Ngoc Nghia @nghiann

    resolved all discussions

    Feb 14, 2020

    resolved all discussions

    resolved all discussions
    Toggle commit list
  • Nguyen Ngoc Nghia @nghiann

    added 1 commit

    • b2de9402 - change applied jobs path

    Compare with previous version

    Feb 14, 2020

    added 1 commit

    • b2de9402 - change applied jobs path

    Compare with previous version

    added 1 commit * b2de9402 - change applied jobs path [Compare with previous version](https://gitlab.zigexn.vn/nghiann/VeNJOB/merge_requests/19/diffs?diff_id=4682&start_sha=8467f3e06759e4b36ad81af051e02df1a707f24e)
    Toggle commit list
  • Nguyen Ngoc Nghia @nghiann

    added 1 commit

    • 94ea04f4 - change applied job path

    Compare with previous version

    Feb 14, 2020

    added 1 commit

    • 94ea04f4 - change applied job path

    Compare with previous version

    added 1 commit * 94ea04f4 - change applied job path [Compare with previous version](https://gitlab.zigexn.vn/nghiann/VeNJOB/merge_requests/19/diffs?diff_id=4683&start_sha=b2de9402ce474d43d9007e0ade035c88112009d0)
    Toggle commit list
  • Nguyen Ngoc Nghia @nghiann

    added 1 commit

    • 9f44af60 - edit routes.rb

    Compare with previous version

    Feb 14, 2020

    added 1 commit

    • 9f44af60 - edit routes.rb

    Compare with previous version

    added 1 commit * 9f44af60 - edit routes.rb [Compare with previous version](https://gitlab.zigexn.vn/nghiann/VeNJOB/merge_requests/19/diffs?diff_id=4684&start_sha=94ea04f498a85d893ebe43a4f2c434916cdccd54)
    Toggle commit list
  • Nguyen Ngoc Nghia @nghiann

    mentioned in commit 2324f19a

    Feb 14, 2020

    mentioned in commit 2324f19a

    mentioned in commit 2324f19a7414925565ab310f545a71d1b6ce2604
    Toggle commit list
  • Nguyen Ngoc Nghia @nghiann

    merged

    Feb 14, 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
Nguyen Ngoc Nghia
Assignee
Nguyen Ngoc Nghia @nghiann
Assign to
None
Milestone
None
Assign milestone
Time tracking
2
2 participants
Reference: nghiann/VeNJOB!19
×

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.