Create Favorite, history job
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
-
added 13 commits
-
d91084a9...f95ce8a2 - 12 commits from branch
master - a41d0f3d - Merge branch 'master' into 'favorite_history'
Toggle commit list -
d91084a9...f95ce8a2 - 12 commits from branch
-
app/controllers/favorite_jobs_controller.rb 0 → 100644
1 class FavoriteJobsController < ApplicationController 2 before_action :sign_in_favorite_validation, only: %i[create destroy] 3 before_action :sign_in_validation, only: [:index] -
app/controllers/favorite_jobs_controller.rb 0 → 100644
1 class FavoriteJobsController < ApplicationController 2 before_action :sign_in_favorite_validation, only: %i[create destroy] 3 before_action :sign_in_validation, only: [:index] 4 5 def index 6 @count = current_user.favorite_jobs.count 7 @favorited_jobs = current_user.favorite_jobs.order_favorite.page(params[:page]).per(Job::LIMIT_PAGE) -
Master
-
Master
dạ ok a
-
-
-
-
app/controllers/history_jobs_controller.rb 0 → 100644
1 class HistoryJobsController < ApplicationController 2 before_action :sign_in_favorite_validation, only: [:destroy] 3 before_action :sign_in_validation, only: [:index] 4 5 def index 6 @count = current_user.histories.count 7 @history_jobs = current_user.histories.order_history 8 end 9 10 private 11 12 def sign_in_favorite_validation -
Master
dạ a, để e thử gom
-
-
30 30 session.delete(:apply_job) 31 31 session.delete(:cv) 32 32 return redirect_to jobs_path unless @job 33 @user = JobApplied.where(user_id: current_user.id, job_id: params[:id]) if signed_in? 33 if signed_in? 34 @user = JobApplied.where(user_id: current_user.id, job_id: params[:id]) -
Master
à cái đó e có nói ở PR apply_job đó a. Là nếu mà user đó apply job đó rồi thì Apply Now => Apllied a ơi
-
-
Toggle commit list
-
added 13 commits
-
6ccea578...f95ce8a2 - 12 commits from branch
master - a8e21f8c - Merge branch 'master' into 'favorite_history'
Toggle commit list -
6ccea578...f95ce8a2 - 12 commits from branch
-
20 20 PASSWORD_FORMAT = /\A(?=.{8,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])/x 21 21 validates :password, format: { with: PASSWORD_FORMAT, message: "is too short or not strength" } 22 22 23 def favoriting?(job_id) -
app/controllers/favorite_jobs_controller.rb 0 → 100644
23 24 count_on_page = @count % Job::LIMIT_PAGE 25 page_number = @count / Job::LIMIT_PAGE 26 link_url = request.referer.to_s.split("=") 27 28 return redirect_to link_url[0] + "=" + page_number.to_s if count_on_page == Job::DIVISIBLE && link_url[1].to_i == page_number + 1 29 30 return redirect_to request.referer if count_on_page == Job::DIVISIBLE 31 end 32 33 respond_to { |format| format.js } 34 end 35 36 private 37 38 def sign_in_validation -
Master
dạ chưa à còn cái đó hwa e quên mất
-
-
app/controllers/history_jobs_controller.rb 0 → 100644
1 class HistoryJobsController < ApplicationController 2 before_action :sign_in_validation, only: [:index] 3 4 def index 5 @count = current_user.histories.count 6 @history_jobs = current_user.histories.order_history 7 end 8 9 private 10 11 def sign_in_validation -
-
-
-
added 13 commits
-
eb40e470...f95ce8a2 - 12 commits from branch
master - 81c677f6 - merge master
Toggle commit list -
eb40e470...f95ce8a2 - 12 commits from branch
-
-
app/views/history_jobs/_history_job.html.erb 0 → 100644
4 <div class="radio-btn col-1"> 5 <%= radio_button_tag :job_id, history_job.job.id %> 6 </div> 7 <div class="job-details col-10"> 8 <div class="title"> 9 <%= link_to job_detail_path(history_job.job.id) do %><strong> 10 <%= history_job.job.title %></strong> 11 <% end %> 12 </div> 13 <div class="row"> 14 <div class="introduction col-12"> 15 <%= strip_tags(history_job.job.format_desc) %><br> 16 <%= link_to 'Read more..', job_detail_path(history_job.job.id) %> 17 </div> 18 <div class="col-6">▼ 19 <%= history_job.job.cities.map(&:name).join(' | ') %> -
-
merged
Toggle commit list