Note that there are some explanatory texts on larger screens.

plurals
  1. POBackslashes in my params
    primarykey
    data
    text
    <p><em><strong>UPDATE:</em></strong> I have narrowed the problem down to the cucumber-rails gem doing something funky. It works up to version 0.4.1, but beyond that I get the below mentioned error. Still no idea why. I've done clean installs of the gem, to no avail.</p> <p>I'm having trouble with my params including extraneous content. </p> <p>A cucumber test submits a form, and there is a hidden field</p> <pre><code>&lt;% if @collection.new_record? &amp;&amp; current_user.pseuds.size &gt; 1 %&gt; &lt;dt&gt;&lt;%= label_tag "owner_pseuds[]", ts("Owner Pseud(s):") %&gt;&lt;/dt&gt; &lt;dd&gt;&lt;%= select_tag "owner_pseuds[]", options_from_collection_for_select(current_user.pseuds, :id, :name, current_user.default_pseud), :multiple =&gt; true %&gt;&lt;/dd&gt; &lt;% else %&gt; &lt;p&gt;&lt;%= hidden_field_tag "owner_pseuds[]", [current_user.default_pseud.id] %&gt;&lt;/p&gt; &lt;% end %&gt; </code></pre> <p>When I use 'Rails.logger.debug it shows me that my owner_pseud ID is 5. However when the form gets POSTed, it shows up as below.</p> <pre><code>Started POST "/collections" for 127.0.0.1 at 2013-04-22 05:01:57 +0100 Processing by CollectionsController#create as HTML Parameters: {"utf8"=&gt;"✓", "owner_pseuds"=&gt;["[\"5\"]"], "collection"=&gt;{"name"=&gt;"collection1", ... </code></pre> <p>And I end up with: Couldn't find Pseud with ID=["5"] (ActiveRecord::RecordNotFound)</p> <p>I am using cucumber-rails (v. 1.3.1) and Capybara (v1.1.4). </p> <p>This is the branch I'm working on: <a href="https://github.com/scottsds/otwarchive/compare/upgrade_capybara_1_1_4" rel="nofollow">https://github.com/scottsds/otwarchive/compare/upgrade_capybara_1_1_4</a>. Thanks for any help you can give!</p> <p>default_pseud returns: #&lt; Pseud:0x0000000a224070 >, which is correct.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload