fixes #when:do: and uses it properly in CartController