How to get all factory_girl factories defined for a particular model class?
<p>I have a factory defined in <code>&lt;Rails-root&gt;/spec/factories/models.rb</code>:</p>

<pre><code>FactoryGirl.define do
  factory :model do
    id 1
    association :organization, factory: :aureso
    name "Default Model"

    factory :serie_1 do
      id 2
      name 'serie_1'
    end

    factory :serie_2 do
      id 3
      name 'serie_2'
    end

    factory :serie_3 do
      id 4
      name 'serie_3'
    end
  end
end
</code></pre>

<p>I want to get all the factories defined for Class <code>Model</code>.</p>

<p>I can get factory definitions for all classes with <code>FactoryGirl.factories</code>, and yes, I can achieve the above using map/reduce. But I want to know if there is any helper method to get all definitions for a model class.</p>