title: Return true or false from a block method inside a method
body: <p>An <code>Item</code> <code>has_many</code> <code>Pieces</code>. I have two methods, one that finds out if the Piece is available and one that finds out if an Item has available pieces. </p>
  
  <pre><code>  # in piece.rb
    def available?(current_user, piece)
      if piece.status == 1
        true
      elsif piece.status == 2
        false
      elsif piece.status == 3
        true if piece.friend_id == current_user.id
      end
    end
  
    #in item.rb
    def available?(current_user, user, item)
      false
        item.pieces.each do |piece|
          if piece.available?(current_user, piece)
            true
          end
        end
    end
  </code></pre>
  
  <p>My <code>available?</code> method in <code>Item</code> is wrong. I want it to return <code>true</code> if an <code>Item</code> has available <code>pieces</code>, and <code>false</code> if not. Theory behind my code is that the method returns <code>false</code> unless there is a piece that returns <code>true</code>. When I do it in the console all I get are the pieces in a hash, not true or false.</p>
  
  <p>Can anyone solve my problem or tell me a better way to do this? </p>