title: DRY FactoryGirl after create/build hooks
body: <p>I want to DRY up the after create/build hooks in my Factory:</p>
  
  <pre><code>FactoryGirl.define do
  
    factory :poll do
  
      sequence :title do |n|
        "MyPollTitle#{n}"
      end
      sequence :description do |n|
        "MyPollDescription#{n}"
      end
      user
  
      factory :poll_with_answers do
  
        ignore do
          answers_count 2
        end
  
        after(:build) do |poll, evaluator|
          evaluator.answers_count.times do
            poll.answers &lt;&lt; build(:answer, poll: poll)
          end
        end
  
        after(:create) do |poll, evaluator|
          evaluator.answers_count.times do
            poll.answers &lt;&lt; create(:answer, poll: poll)
          end
        end
      end
    end
  end
  </code></pre>
  
  <p>The problem I was facing is that it seems I can't define methods in FG? Idea how to DRY this up?</p>