title: Payola issue: undefined method `amount' for nil:NilClass
body: <p>I'm just learning how to use Payola to create Subscriptions for my RoR 5.1.5 test app. I'm following along with the instructions on the wiki.</p>
  
  <p>I've set up the sample form taken from the example on the Wiki and dropped it right into app/views/subscriptions/new.html.erb. When I enter the credit card, email, expiration date and click Submit, I get this Rails error: undefined method `amount' for nil:NilClass</p>
  
  <p>I've created the SubscriptionPlan in the rails console and confirmed it exists.
  I've confirmed that the new Plan shows up in my Stripe dashboard after creating it in the console.</p>
  
  <p>I'm sure I've overlooked something, and hoping someone has experienced this same issue and can point me in the right direction. It feels like I am not specifying the plan anywhere. I'm not sure how I should do that.</p>
  
  <p>Thanks for your help.</p>
  
  <p>Code is here.
  app/models/subscription_plan.rb</p>
  
  <pre><code>class SubscriptionPlan &lt; ActiveRecord::Base
    include Payola::Plan
  end
  </code></pre>
  
  <p>/app/controllers/subscriptions_controller.rb</p>
  
  <pre><code>class SubscriptionsController &lt; ApplicationController
    # bring in the `render_payola_status` helper.
    include Payola::StatusBehavior
  
    def new
      @plan = SubscriptionPlan.first
    end
  
    def create
      # do any required setup here, including finding or creating the owner object
      owner = current_user # this is just an example for Devise
  
      # set your plan in the params hash
      params[:plan] = SubscriptionPlan.find_by(id: params[:plan_id])
  
      # call Payola::CreateSubscription
      subscription = Payola::CreateSubscription.call(params, owner)
  
      # Render the status json that Payola's javascript expects
      render_payola_status(subscription)
    end
  end
  </code></pre>
  
  <p>/app/views/subscriptions/new.html.erb</p>
  
  <pre><code> &lt;!-- this header can go in &lt;head&gt; or at the bottom of &lt;body&gt; --&gt;
  &lt;%= render 'payola/transactions/stripe_header' %&gt;
  
  &lt;%= form_tag('/subscriptions',
        class: 'payola-onestep-subscription-form',
        'data-payola-base-path' =&gt; '/payola',
        'data-payola-plan-type' =&gt; @plan.plan_class,
        'data-payola-plan-id' =&gt; @plan.id
    ) do |f| %&gt;
    &lt;span class="payola-payment-error"&gt;&lt;/span&gt;
    Email:&lt;br&gt;
    &lt;input type="email" name="stripeEmail" data-payola="email"&gt;&lt;/input&gt;&lt;br&gt;
    Card Number&lt;br&gt;
    &lt;input type="text" data-stripe="number"&gt;&lt;/input&gt;&lt;br&gt;
    Exp Month&lt;br&gt;
    &lt;input type="text" data-stripe="exp_month"&gt;&lt;/input&gt;&lt;br&gt;
    Exp Year&lt;br&gt;
    &lt;input type="text" data-stripe="exp_year"&gt;&lt;/input&gt;&lt;br&gt;
    CVC&lt;br&gt;
    &lt;input type="text" data-stripe="cvc"&gt;&lt;/input&gt;&lt;br&gt;
    &lt;input type="submit"&gt;&lt;/input&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>/app/config/routes.rb</p>
  
  <pre><code>Rails.application.routes.draw do
    devise_for :users
    root to: "pages#index"
    resources :subscriptions
    get 'pages/index'
  
    get 'pages/donate'
  
    mount Payola::Engine =&gt; '/payola', as: :payola
    # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
  end
  </code></pre>