title: Retrieved data from tables
body: <p>I have been breaking my head for 3 hours now and I can't figure this out, I recently started working with Rails and I'm in love with it, but there's still some little things I don't know. Like I have a view that pulls all the data from a table.</p>
  
  <pre><code>&lt;% @albums.each do |album| %&gt;
  &lt;div class="album"&gt;
  &lt;%= album.artist %&gt; - &lt;%= album.album %&gt;
  &lt;/div&gt;
  
  &lt;div class="albumTask"&gt;
    &lt;%= link_to 'Show', album %&gt;
    &lt;% if can? :update, @album %&gt;
      &lt;%= link_to 'Edit', edit_album_path(album) %&gt;
    &lt;% end %&gt;
    &lt;% if can? :destroy, @albumy %&gt;
      &lt;%= link_to 'Destroy', album, confirm: 'Are you sure?', method: :delete %&gt;
    &lt;% end %&gt;
  &lt;/div&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>But what I really want it to do is to only pull the data where genre = Dubstep. Now in PHP I would do something like.</p>
  
  <pre><code>$result = mysql_query("SELECT * FROM albums WHERE genre='dubstep'")
  </code></pre>
  
  <p>What am I missing?</p>