How do I resolve this syntax error
Hi guys,
I have this error and I don't understand what the error is. I'm using Rails 6
syntax error, unexpected tLABEL
stripe_id: customer.id,
~~~~~~~~~
/vagrant/Rails/stripe-test/app/controllers/subscriptions_controller.rb:34: syntax error, unexpected tLABEL, expecting '='
My code is:
options = (
stripe_id: customer.id,
stripe_subscription_id: subscription.id
)
current_user.update(options)
Thanks,
Jim
Presumably you meant options to be a hash? You used () instead of {}
options = {
stripe_id: customer.id,
stripe_subscription_id: subscription.id
}