Commit 969dcb24 by Nguyen Ngoc Nghia Committed by nnnghia98

create view for applied jobs

parent b3f131ec
class Users::MyPagesController < ApplicationController class Users::MyPagesController < ApplicationController
def show def show
end end
def applied_jobs
@applied_jobs = current_user.jobs.all
end
end end
Applied jobs here
\ No newline at end of file
...@@ -6,5 +6,5 @@ ...@@ -6,5 +6,5 @@
<h3>My CV: <%= current_user.cv_path %></h3> <h3>My CV: <%= current_user.cv_path %></h3>
<%= link_to "Edit", edit_user_registration_path, class: "btn btn-lg btn-primary" %> <%= link_to "Edit", edit_user_registration_path, class: "btn btn-lg btn-primary" %>
<%= link_to "My jobs", "#", class: "btn btn-lg btn-primary" %> <%= link_to "My jobs", jobs_users_my_page_path, class: "btn btn-lg btn-primary" %>
</div> </div>
...@@ -11,6 +11,8 @@ Rails.application.routes.draw do ...@@ -11,6 +11,8 @@ Rails.application.routes.draw do
devise_for :users devise_for :users
root "tops#index" root "tops#index"
namespace :users do namespace :users do
resource :my_page, only: :show resource :my_page, only: :show do
get "/jobs", to: "my_pages#applied_jobs"
end
end end
end end
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 to comment