Variable naming in Ruby tends to follow the convention of all lowercase letters with underscores separating words (thus the username in your example). There is no special convention for datetime, Rails simply tries to put a few attributes on the default models, which end with "_at". Other general conventions:
- method names follow the same convention as variables.
- constants usually are uppercase with underscores between words (i.e. MAX_LENGTH).
- class / module names usually have a camel (e.g. HourlyEmployee).
source share