Read more

FactoryBot: How to get the class from a factory name

Arne Hartherz
March 12, 2015Software engineer at makandra GmbH

When you want to look up a class for a given factory, do it like this:

>> FactoryBot.factories.find('admin').build_class
=> User
Illustration web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show archive.org snapshot

In older versions, you could do:

>> FactoryBot.factory_by_name('admin').build_class
=> User
Posted by Arne Hartherz to makandra dev (2015-03-12 10:38)