Method: Naf::MachineAffinitySlotsController#update
- Defined in:
- app/controllers/naf/machine_affinity_slots_controller.rb
#update ⇒ Object
49 50 51 52 53 54 55 56 57 58 |
# File 'app/controllers/naf/machine_affinity_slots_controller.rb', line 49 def update @slot = Naf::MachineAffinitySlot.find(params[:id]) @machine = Naf::Machine.find(@slot.machine_id) if @slot.update_attributes(params[:machine_affinity_slot]) redirect_to(naf.machine_machine_affinity_slot_path(@machine, @slot), notice: "Machine Affinity Slot '#{@slot.affinity_name}' was successfully updated") else render action: "edit", machine_id: @machine.id end end |