title: Retrieve database records in Rails
body: <p>My model named <code>Person</code> contains 3 columns namely <code>name</code>,<code>age</code>,<code>gender</code>. </p>
  
  <p>Now how to get all the rows if the <code>gender = "male"</code>. I try to
  fetch the data as shown below.</p>
  
  <pre><code>p = Person.find_by_gender("male")
  </code></pre>
  
  <p>The above statement properly worked. But it returns only 1 record. Because, the statement is converted to like following query. </p>
  
  <pre><code>SELECT  "persons".* FROM "persons" WHERE "persons"."gender" = $1 LIMIT 1  [["gender", "male"]]
  </code></pre>
  
  <p>Due to limit is set to 1 it returns only 1 record. So, <strong>how to unset the limit?</strong> My requirement to get all the records in table if <code>gender</code>
  matches <code>"male"</code>. </p>