How to apply a discount code for a new subscriber ?
ycourse opened this issue · comments
Hello Guys,
I would like apply a discount code like this for a new subscriber
https://xxxxxx.com/signup?plan=xxxx?discount_code=xxx
Is this possible ? Thank you.
There is already an attr_accessor for coupon. Set @user.coupon to params[:discount_code] in the controller and add it to the update_plan method in the model.