I\'m learning about Factory Girl and I saw this code:
factory :post do association :author, factory: :user, last_name: \"Writely\" end
why do
The colon in this context denotes a literal Hash.
factory is the Hash key, :user is the value.
factory
Hash
:user
The alternative syntax is :factory => :user. They mean the same thing.
:factory => :user