1
0
mirror of synced 2026-08-06 23:27:03 +00:00

permit create account

This commit is contained in:
Rimian Perkins
2017-05-23 14:36:16 +10:00
3 changed files with 4 additions and 4 deletions
@@ -7,7 +7,7 @@ module DiscourseDonations
skip_before_filter :verify_authenticity_token, only: [:create]
def create
params.permit(:name, :username, :email, :password, :stripeToken, :amount, :plan)
params.permit(:name, :username, :email, :password, :stripeToken, :amount, :plan, :create_account)
output = { 'messages' => [], 'rewards' => [] }
+1 -1
View File
@@ -1,6 +1,6 @@
# name: discourse-donations
# about: Integrating Discourse with Stripe for donations
# version: 1.10.0
# version: 1.10.1
# url: https://github.com/choiceaustralia/discourse-donations
# authors: Rimian Perkins
@@ -24,8 +24,8 @@ module DiscourseDonations
end
it 'whitelists the params' do
params = { email: 'email@example.com', password: 'secret', username: 'mr-pink', name: 'kirsten', amount: 100, plan: 'some-plan-id', stripeToken: 'rrurrrurrrrr' }
should permit(:name, :username, :email, :password, :plan).for(:create, params: params)
params = { create_account: 'true', email: 'email@example.com', password: 'secret', username: 'mr-pink', name: 'kirsten', amount: 100, plan: 'some-plan-id', stripeToken: 'rrurrrurrrrr' }
should permit(:name, :username, :email, :password, :plan, :create_account).for(:create, params: params)
end
it 'responds ok for anonymous users' do