Simply Rails 2: passing parameters to methods
This is less a Rails2 question, and more a Ruby "way" question. It was my understanding that only when you pass multiple parameters to a method should you use parens. However, on p.308 I'm modifying a controller method to accept multiple parameters, and the text indicates the opposite approach:
@stories = Story.find(:all)
@stories = Story.find :all, :order => 'id DESC', :conditions => 'votes_count >= 5'
When I look at RESTfully generated controllers I see that one parameter method calls are wrapped in parens. My research leads me to believe that the best approach is the one which results in the greatest readability.