From 7342f14c943271c5c5b78213c764aa6a3fec4016 Mon Sep 17 00:00:00 2001 From: Matt Bridges Date: Wed, 9 Jan 2013 10:04:09 -0600 Subject: adding small mention one single line blocks in contributing to rails [ci skip] --- guides/source/contributing_to_ruby_on_rails.md | 1 + 1 file changed, 1 insertion(+) (limited to 'guides/source/contributing_to_ruby_on_rails.md') diff --git a/guides/source/contributing_to_ruby_on_rails.md b/guides/source/contributing_to_ruby_on_rails.md index 7c5a472971..baef620c6c 100644 --- a/guides/source/contributing_to_ruby_on_rails.md +++ b/guides/source/contributing_to_ruby_on_rails.md @@ -216,6 +216,7 @@ Rails follows a simple set of coding style conventions: * Use `MyClass.my_method(my_arg)` not `my_method( my_arg )` or `my_method my_arg`. * Use `a = b` and not `a=b`. * Use assert_not methods instead of refute. +* Prefer `method { do_stuff }` instead of `method{do_stuff}` for single-line blocks. * Follow the conventions in the source you see used already. The above are guidelines — please use your best judgment in using them. -- cgit v1.2.3