title: Showing only Objects from the past 30 days
body: <p>Having finally manage to get my app to list jobs under specific dates. I am now looking to find a way to only show jobs created within the past 30 days. </p>
  
  <p>At the moment my method for showing jobs sits in a partial and looks like this:</p>
  
  <pre><code> &lt;% @jobs.group_by{|x| x.created_at.strftime("%d %b. %Y")}.each do |date,jobs_on_that_date| %&gt;
  
   &lt;section class="date"&gt;
     &lt;%= date %&gt;
   &lt;/section&gt;
  
   &lt;section id="top-job"&gt;
     &lt;% jobs_on_that_date.each do |job| %&gt;
      &lt;section id="job-wrapper"&gt;
        &lt;%= link_to url_with_protocol(@link.job_url), :target =&gt; '_blank' do %&gt;
        &lt;section id="job"&gt;
          &lt;%= job.title %&gt; - &lt;%= job.company %&gt;
          &lt;%= job.salary %&gt;
          &lt;%= job.location %&gt; 
          &lt;%= job.job_type %&gt;
      &lt;/section&gt;
   &lt;/section&gt; 
  &lt;% end %&gt;
   &lt;% end %&gt;
   &lt;/section&gt;
   &lt;% end %&gt;
  </code></pre>
  
  <p>Is there way to integrate only showing the past 30 days worth of jobs in the view or would it be better to define this in the controller? </p>
  
  <p>Thanks!</p>