Created
March 23, 2013 02:56
-
-
Save cmer/5226221 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# routes.rb | |
put '/payment_details' => 'payment_details#update' | |
# controller | |
class PaymentDetails < Controller | |
def update | |
stripe = Stripe.new | |
stripe.email = params[:stripe][:email] | |
stripe.address = params[:stripe][:address] | |
current_user.first_name = params[:user][:first_name] | |
current_user.last_name = params[:user][:last_name] | |
current_user.save! | |
stripe.submit! | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Est-ce qu'il y à une raison pour laquelle la classe PaymentDetails n'hérite pas de ApplicationController comme par défaut?