Skip to content

Instantly share code, notes, and snippets.

@cmer
Created March 23, 2013 02:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmer/5226221 to your computer and use it in GitHub Desktop.
Save cmer/5226221 to your computer and use it in GitHub Desktop.
# 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
@franciso
Copy link

Est-ce qu'il y à une raison pour laquelle la classe PaymentDetails n'hérite pas de ApplicationController comme par défaut?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment