Assigning parent explicitly

You can also assign the parent explicitly:

factory :post do
  title { "A title" }
end

factory :approved_post, parent: :post do
  approved { true }
end