title: Rails faker gem produces same product name
body: <p>I'm trying to use rails Faker gem to produce unique product names to make sample Item models in the database. I've used Faker multiple times but for some reason I can't produce new product names. I've made the nameMaker function to avoid possible early repeats, but I get a record invalidation just after one insert. Does anyone know how I could fix this?</p>
  
  <p>seed.rb:</p>
  
  <pre><code>98.times do |n|
      name = Item.nameMaker
      description = Faker::Lorem.sentence(1)
      price = Item.priceMaker
      item = Item.create!(
          name: name,
          description: description,
          price: price)
      end
  </code></pre>
  
  <p>item.rb:</p>
  
  <pre><code>class Item &lt; ActiveRecord::Base
      validates :name, presence: true, length: { maximum: 100 }
      validates :description, presence: true,
          length: { maximum: 1000 }
      VALID_PRICE_REGEX = /\A\d+(?:\.\d{0,3})?\z/
      validates :price, presence: true,
          :format =&gt; { with: VALID_PRICE_REGEX },
          :numericality =&gt; {:greater_than =&gt; 0}
      validates_uniqueness_of :name  
  
      def Item.nameMaker
          loop do
              name = Item.newName
              break if Item.find_by(name: name).nil?
          end
          return name
      end
  
      def Item.newName
          Faker::Commerce.product_name
      end 
  end
  </code></pre>