Skip to content

Instantly share code, notes, and snippets.

@rishav
Created October 10, 2010 05:50
Show Gist options
  • Select an option

  • Save rishav/619002 to your computer and use it in GitHub Desktop.

Select an option

Save rishav/619002 to your computer and use it in GitHub Desktop.
- No methods more than 10 lines
- Use database migrations
- after committing a db migration, don't change it. Just add Another migration
- Thin Controllers, Avoid sharing more than one or two instance variables b/w controllers and views
- use REST at all times
- Use one type of http request per action, do not use "request.post?" type methods.
- Avoid using comments. If unclear, Refactor.
- use "h" in views, to escape everything
- do not use abbreviations for variable names
- follow naming conventions don't use variable names like photoalbum use photo_album instead
- make sure to use "2 space" Tab, ( find out or ask for whatever editor / IDE you use )
- use current_user at all times
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment