RailsApps / rails-stripe-membership-saas

An example Rails 4.2 app with Stripe and the Payola gem for a membership or subscription site.

Home Page:http://railsapps.github.io/rails-stripe-membership-saas

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Changing to current plan (e.g. silver => silver) causes template error

benmicol opened this issue · comments

Minor issue, but the case when changing plan to the existing/same plan is not properly routed and causes a missing template error. The simple work around was to add another condition statement in the registrations controller so that when the "plan == current_user.plan" a flash message of something like.... "Must choose a different plan...." appears and then renders the ":edit" page again. As it stands, the registration controller's "change plan" method only accounts for cases that fall under the "unless plan == current_user.plan" condition. I understand that this may be outside of the scope of the project and it is a trivial "fit and finish" concern, but I thought I would mention it since it is a relatively simple fix, depending on the best practice for implementation, of which my workaround is probably not.