Setting nil values in Machinist blueprints

Take care when trying to set attributes to nil in a blueprint.

Given the following master blueprint:
Story.blueprint do
title
author { User.make }
editor { User.make }
end

This approach will not overwrite/remove the editor defined in the master blueprint:
Story.blueprint(:draft) do
editor nil
end

...whereas this one will (note the lambda):
Story.blueprint(:draft) do
editor { nil }
end

Arne Hartherz Over 13 years ago