The Life of a Radar

Orderly Code is Readable Code
07 Oct 2008

We were talking in #offrails today about coding standards and a few points came up on how to lay out “good” rails code. They were:

For controllers I would put filters first, then the 7 restful actions (index, show, new, create, edit, update and destroy) and then the custom actions and then if I needed to find a parent resource (for example /forums/1/topics) I would call private and then put a find_forum method there.

blog comments powered by Disqus