Class: PassesKitsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/passes_kits_controller.rb

Instance Method Summary collapse

Instance Method Details

#editObject



11
12
13
# File 'app/controllers/passes_kits_controller.rb', line 11

def edit
  @kit = Kit.find(params[:id])
end

#updateObject



15
16
17
18
19
20
21
22
23
24
# File 'app/controllers/passes_kits_controller.rb', line 15

def update
  @kit = Kit.find(params[:id])

  if @kit.update_attributes(params[:passes_kit])
    redirect_to organization_path(@kit.organization)
  else
    flash[:error] = "We had a problem configuring your kit. Please try again."
    render :edit
  end
end