Skip to content

Instantly share code, notes, and snippets.

@pnegri
Created May 2, 2011 20:03
Show Gist options
  • Save pnegri/952249 to your computer and use it in GitHub Desktop.
Save pnegri/952249 to your computer and use it in GitHub Desktop.
module ApplicationHelper
def configurar_pedido(pedido)
returning(pedido) do |p|
p.iteracoes.build if p.iteracoes.empty?
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment