Class: RegularDonationKitsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- RegularDonationKitsController
- Defined in:
- app/controllers/regular_donation_kits_controller.rb
Instance Method Summary collapse
Instance Method Details
#edit ⇒ Object
11 12 13 |
# File 'app/controllers/regular_donation_kits_controller.rb', line 11 def edit @kit = Kit.find(params[:id]) end |
#update ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/controllers/regular_donation_kits_controller.rb', line 15 def update @kit = Kit.find(params[:id]) if @kit.update_attributes(kit_params) flash[:notice] = 'Your changes have been saved.' redirect_to organization_path(@kit.organization) else flash[:error] = 'We had a problem configuring your kit. Please try again.' render :edit end end |