title: How to pass match options to a within block in capybara 2.1
body: <p>After updating capybara to 2.1, It is throwing Ambiguous error</p>
  
  <pre><code>Capybara::Ambiguous:
     Ambiguous match, found 2 elements matching css "div.alert"
  </code></pre>
  
  <p>and after reading some <a href="http://www.elabs.se/blog/60-introducing-capybara-2-1" rel="nofollow">articles and the log here</a>. You can get the default behaviour from 1.0x by passing <code>:match =&gt; :prefer_exact</code></p>
  
  <p>This can be easily done for something like <code>fill</code>, like this</p>
  
  <pre><code>fill ("Password", :match =&gt; :prefer_exact'
  </code></pre>
  
  <p>but how do you do it for a <code>within</code> block like this</p>
  
  <pre><code>within 'div.alert' do
    page.should have_content(text)
  end
  </code></pre>
  
  <p>I tried doing this, but it throws an error</p>
  
  <pre><code>within ('div.alert', :match =&gt; :prefer_exact) do
    page.should have_content(text)
  end
  </code></pre>
  
  <p>any suggestions would be helpful.</p>