Wednesday, March 14, 2007

Rails Method without parentheses

The parentheses of a method are optional in most cases.
In cases where the syntax is more complex or you call more than one method in a row, you may need the parentheses to make it clear to Ruby what you mean. Most people use parentheses for method calls, but you’ll see method calls with no parentheses in most Rails applications.

dd

No comments: