title: Rails how to check if bulk create was successful
body: <p>I am working on a rails method where I need to create copies of a resource. I am using dup for that.</p>
  
  <p>Right now I am using save method in saving new copies and saving it in the iteration:</p>
  
  <pre><code>(User.leads2deals.emails - [@old_inquiry.to_email]).each do |dealer|
                  @inquiry = @old_inquiry.dup
                  @inquiry.to_email = dealer          
                  @inquiry.senttoall = true
  
                  if !@inquiry.save
                      all_saved = false
                  end
  
  end
  </code></pre>
  
  <p>Depending upon the all_saved boolean flag, I am sending the right message to the user as shown:</p>
  
  <pre><code>    if all_saved
  
          @old_inquiry.senttoall = true
          @old_inquiry.save
  
          respond_to do |format|
              format.html {redirect_to @parent, notice: 'All Leads were successfuly sent!'}
          end
      else
          respond_to do |format|
              format.html {redirect_to @parent, notice: 'There was some problems sending all the leads! Try sending one by one'}
          end
      end
  </code></pre>
  
  <p>My question is I want to use bulk create. Use an array, build objects and finally call create on that array of the object for efficiency.</p>
  
  <p>But I want to check if create fails for any of the objects, in that case, I will change my boolean flag to false and give the user notifications that not all inquiries were saved. </p>
  
  <p>I checked that create or create! does not return true/false. In this case, how can I check if all the objects were successfully created or not?</p>