1
0
Fork 0
forked from OpenNeo/impress
impress/app/controllers/donations_controller.rb

21 lines
516 B
Ruby
Raw Normal View History

2014-09-09 19:06:38 -07:00
class DonationsController < ApplicationController
def create
@donation = Donation.create_from_charge(current_user, params[:donation])
redirect_to @donation
end
def show
@donation = Donation.from_param(params[:id])
end
def update
@donation = Donation.from_param(params[:id])
@donation.update_attributes params[:donation]
@donation.save!
flash[:success] = 'Donation details saved! ' +
'Also, have we thanked you yet today? Thank you!'
redirect_to @donation
2014-09-09 19:06:38 -07:00
end
end