Rails 4, Capybara: form_tag produces nil params hash. Why?
<p>Rails 4: While running a feature spec with Capybara, my params hash is nil. </p>

<p>What am I doing wrong here?</p>

<pre><code># app/views/comics/index.html.erb

&lt;%= form_tag subscriptions_subscribe_path do %&gt;
  &lt;%= label_tag :email %&gt;
  &lt;%= text_field_tag :email, params[:email]%&gt;
  &lt;%= submit_tag 'Submit'%&gt;
&lt;% end %&gt;


# spec/features/subscribe_feature_spec.rb

require 'rails_helper'
require 'pry'

feature 'subscribe to email list' do
  scenario 'success' do
    visitor_email = 'Monkey@Biz.com'
    visit '/'
    fill_in :email, with: visitor_email
    click_on 'Submit'
    # ...balance omitted...
  end 
end

# app/controllers/subscriptions_controller.rb

class SubscriptionsController &lt; ApplicationController

  def subscribe
    binding.pry
    # params = nil ... WHY?       
    # params[:email] =&gt; undefined method `email' for nil:NilClass
    # ...balance omitted...
  end
end
</code></pre>

<p>I've got a bonehead error somewhere in the code above. </p>

<p>My view contains only a single instance of the word "Submit", so Capybara is not clicking the wrong link. </p>

<p>logs</p>

<pre><code>$ tail -f log/test.log
Started GET "/" for 127.0.0.1 at 2016-03-19 15:01:07 -0700
Processing by ComicsController#index as HTML
  Comic Load (0.3ms)  SELECT "comics".* FROM "comics"
  Rendered comics/index.html.erb within layouts/application (12.4ms)
  Rendered shared/_navlinks.html.erb (1.4ms)
  Rendered shared/_navlinks.html.erb (0.1ms)
Completed 200 OK in 349ms (Views: 348.6ms | ActiveRecord: 0.3ms)
Started POST "/subscriptions/subscribe" for 127.0.0.1 at 2016-03-19 15:01:08 -0700
Processing by SubscriptionsController#subscribe as HTML

Parameters: {"utf8"=&gt;"✓", "email"=&gt;"Monkey@Biz.com", "commit"=&gt;"Submit"}
</code></pre>