Rails controller match one var to another var
<p>I have a table that has alot of data inside it</p>

<p>I'm wanting to do something like this. To grab everything inside a column that matches something else inside another column in another table.</p>

<p>So <code>@car = Cardata.find_by(@carmake)</code></p>

<p>So, <code>@carmake</code> will be volvo, Typed in a separate form and stored in a table.</p>

<p>In the table <code>Cardata</code> there is a massive list (about 40k records) with different cars ranging from ford to renault to volvo.</p>

<p>The question is. Would <code>@car</code> display all the records that have the word volvo inside?? Or is it the wrong way of doing this? or do i need to label it by column?</p>

<p>Sam</p>