Class: HrEngine6::JobListingsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/hr_engine6/job_listings_controller.rb

Instance Method Summary collapse

Instance Method Details

#clientindexObject



13
14
15
# File 'app/controllers/hr_engine6/job_listings_controller.rb', line 13

def clientindex
  @job_listings = JobListing.all
end

#clientshowObject



22
23
# File 'app/controllers/hr_engine6/job_listings_controller.rb', line 22

def clientshow
end

#createObject

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

#destroyObject

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

#editObject

GET /job_listings/1/edit



31
32
# File 'app/controllers/hr_engine6/job_listings_controller.rb', line 31

def edit
end

#indexObject

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

#newObject

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

#showObject

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

#updateObject

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