2

I am getting this error when a user tries to sign up. I have not changed any file after using the rails composer, but still get the error.

<div class="authform">
  <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :role => 'form',
        :class => 'payola-onestep-subscription-form',
        'data-payola-base-path' => payola_path,
        'data-payola-plan-type' => resource.plan.plan_class,
        'data-payola-plan-id' => resource.plan.id}) do |f| %>
    <h3>Sign up</h3>
    <div>
      <br />
      <span id="error_explanation" class="payola-payment-error"></span>
  • Did you check your controller to see if @resource (or @resources) was nil? Is there guaranteed to be a plan associated with each resource? – MarsAtomic Apr 21 '15 at 20:05
  • You should specify in your question that you are using Rails Composer to generate the rails-stripe-membership-saas starter application. Rails Composer can be used to generate a dozen different starter apps. It appears the issue is not with Rails Composer but perhaps with the rails-stripe-membership-saas starter application, in which case you should open an issue on the GitHub repo. – Daniel Kehoe Apr 24 '15 at 12:02

1 Answers1

0

Use

resource.class

instead of

resource.plan.plan_class
Wally Altman
  • 3,535
  • 3
  • 25
  • 33
sparkle
  • 7,530
  • 22
  • 69
  • 131