Class: HrEngine6::JobListingsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- HrEngine6::JobListingsController
- Defined in:
- app/controllers/hr_engine6/job_listings_controller.rb
Instance Method Summary collapse
- #clientindex ⇒ Object
- #clientshow ⇒ Object
-
#create ⇒ Object
POST /job_listings POST /job_listings.json.
-
#destroy ⇒ Object
DELETE /job_listings/1 DELETE /job_listings/1.json.
-
#edit ⇒ Object
GET /job_listings/1/edit.
-
#index ⇒ Object
GET /job_listings GET /job_listings.json.
-
#new ⇒ Object
GET /job_listings/new.
-
#show ⇒ Object
GET /job_listings/1 GET /job_listings/1.json.
-
#update ⇒ Object
PATCH/PUT /job_listings/1 PATCH/PUT /job_listings/1.json.
Instance Method Details
#clientindex ⇒ Object
13 14 15 |
# File 'app/controllers/hr_engine6/job_listings_controller.rb', line 13 def clientindex @job_listings = JobListing.all end |
#clientshow ⇒ Object
22 23 |
# File 'app/controllers/hr_engine6/job_listings_controller.rb', line 22 def clientshow end |
#create ⇒ Object
POST /job_listings POST /job_listings.json
36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'app/controllers/hr_engine6/job_listings_controller.rb', line 36 def create @job_listing = JobListing.new(job_listing_params) respond_to do |format| if @job_listing.save format.html { redirect_to @job_listing, notice: 'İş ilanı başarıyla oluşturuldu.' } format.json { render 'job_listings/clientshow', status: :created, location: @job_listing } else format.html { render :new } format.json { render json: @job_listing.errors, status: :unprocessable_entity } end end end |
#destroy ⇒ Object
DELETE /job_listings/1 DELETE /job_listings/1.json
66 67 68 69 70 71 72 |
# File 'app/controllers/hr_engine6/job_listings_controller.rb', line 66 def destroy @job_listing.destroy respond_to do |format| format.html { redirect_to job_listings_url, notice: 'İş başvurusu başarıyla silindi.' } format.json { head :no_content } end end |
#edit ⇒ Object
GET /job_listings/1/edit
31 32 |
# File 'app/controllers/hr_engine6/job_listings_controller.rb', line 31 def edit end |
#index ⇒ Object
GET /job_listings GET /job_listings.json
9 10 11 |
# File 'app/controllers/hr_engine6/job_listings_controller.rb', line 9 def index @job_listings = JobListing.all end |
#new ⇒ Object
GET /job_listings/new
26 27 28 |
# File 'app/controllers/hr_engine6/job_listings_controller.rb', line 26 def new @job_listing = JobListing.new end |
#show ⇒ Object
GET /job_listings/1 GET /job_listings/1.json
19 20 |
# File 'app/controllers/hr_engine6/job_listings_controller.rb', line 19 def show end |
#update ⇒ Object
PATCH/PUT /job_listings/1 PATCH/PUT /job_listings/1.json
52 53 54 55 56 57 58 59 60 61 62 |
# File 'app/controllers/hr_engine6/job_listings_controller.rb', line 52 def update respond_to do |format| if @job_listing.update(job_listing_params) format.html { redirect_to @job_listing, notice: 'İş başvurusu başarıyla güncellendi.' } format.json { render :'job_listings/clientshow', status: :ok, location: @job_listing } else format.html { render :edit } format.json { render json: @job_listing.errors, status: :unprocessable_entity } end end end |