title: How to show loop data from orders only having created_at != updated_at?
body: <p>I want to show the response time, which I have set up but it currently shows the response time with all orders into account, so it's not accurate.</p>
  
  <p>For example, there are 3 orders by buyers and a seller takes 2 days to respond to 1 of those orders, i want it to say 2 days.  Instead of taking all 3 orders into account and saying .66 days.</p>
  
  <p>Here's the controller for the page its displayed on:</p>
  
  <pre><code>    @orders = Order.all.where(seller: current_user).paginate(:page =&gt; params[:page], :per_page =&gt; 15) || @orders = Order.all.where(seller: current_buyer).paginate(:page =&gt; params[:page], :per_page =&gt; 15)
  
      @orders_a = Order.all.where(seller: current_user) || @orders = Order.all.where(seller: current_buyer)
      @orders_month = @orders_a.all.group_by { |mon|  mon.created_at.beginning_of_month }
      @orders_day = @orders_a.all.group_by { |day|  day.created_at.beginning_of_day }
  
  
      @order = Order.new
  </code></pre>
  
  <p>The @orders_month and @orders_day are the ones displaying the information.  (It is both charted and graphed in a table)</p>
  
  <p>Here's the view:</p>
  
  <pre><code>  &lt;% @orders_month.each do |month, orders| %&gt;
         &lt;tbody&gt;
            &lt;tr&gt;
               &lt;td&gt;&lt;%= month.strftime("%B") %&gt;&lt;/td&gt;
               &lt;td class="center"&gt;&lt;%= orders.count %&gt;&lt;/td&gt;
               &lt;td class="center"&gt;&lt;%= (orders.sum { |order| order.updated_at.day - order.created_at.day } / orders.count ) %&gt; Days&lt;/td&gt;
               &lt;/td&gt;
     &lt;% end %&gt;
  </code></pre>
  
  <p>I have tried adding attempts like and similar to the following with no avail:
  if order.updated_at != order.created_at</p>