Commit 9d59d2c4 by nnnghia98

render applied jobs

parent 969dcb24
class JobsController < ApplicationController class JobsController < ApplicationController
before_action :authenticate_user!, only: [:apply, :confirm_apply, :finish_apply]
def index def index
if params[:city_id] if params[:city_id]
@city = City.find(params[:city_id]) @city = City.find(params[:city_id])
......
class Users::MyPagesController < ApplicationController class Users::MyPagesController < ApplicationController
before_action :authenticate_user!, only: [:show, :applied_jobs]
def show def show
end end
def applied_jobs def applied_jobs
@applied_jobs = current_user.jobs.all @applied_jobs = current_user.jobs.all.decorate
end end
end end
Applied jobs here <h1>Applied jobs</h1>
\ No newline at end of file
<%= render partial: "jobs/job", collection: @applied_jobs %>
...@@ -8,5 +8,6 @@ ...@@ -8,5 +8,6 @@
"@rails/webpacker": "^4.2.0", "@rails/webpacker": "^4.2.0",
"turbolinks": "^5.2.0" "turbolinks": "^5.2.0"
}, },
"version": "0.1.0" "version": "0.1.0",
"license": "UNLICENSED"
} }
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