I'm guessing you used curly braces here because you ran into problems with do..end? If so, you could use parentheses.