Class: Auctify::BidderRegistrationsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/auctify/bidder_registrations_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject

POST /bidder_registrations



28
29
30
31
32
33
34
35
36
# File 'app/controllers/auctify/bidder_registrations_controller.rb', line 28

def create
  @bidder_registration = BidderRegistration.new(bidder_registration_params)

  if @bidder_registration.save
    redirect_to @bidder_registration, notice: "Bidder registration was successfully created."
  else
    render :new
  end
end

#destroyObject

DELETE /bidder_registrations/1



48
49
50
51
52
53
54
# File 'app/controllers/auctify/bidder_registrations_controller.rb', line 48

def destroy
  if @bidder_registration.destroy
    redirect_to auctify_bidder_registrations_url, notice: "Bidder registration was successfully destroyed."
  else
    render json: { errors: @bidder_registration.errors }
  end
end

#editObject

GET /bidder_registrations/1/edit



24
25
# File 'app/controllers/auctify/bidder_registrations_controller.rb', line 24

def edit
end

#indexObject

GET /bidder_registrations



10
11
12
# File 'app/controllers/auctify/bidder_registrations_controller.rb', line 10

def index
  @bidder_registrations = BidderRegistration.all
end

#newObject

GET /bidder_registrations/new



19
20
21
# File 'app/controllers/auctify/bidder_registrations_controller.rb', line 19

def new
  @bidder_registration = BidderRegistration.new
end

#showObject

GET /bidder_registrations/1



15
16
# File 'app/controllers/auctify/bidder_registrations_controller.rb', line 15

def show
end

#updateObject

PATCH/PUT /bidder_registrations/1



39
40
41
42
43
44
45
# File 'app/controllers/auctify/bidder_registrations_controller.rb', line 39

def update
  if @bidder_registration.update(bidder_registration_params)
    redirect_to @bidder_registration, notice: "Bidder registration was successfully updated."
  else
    render :edit
  end
end