ookami-coding-style-rails
Installation
SKILL.md
Rails Coding Style
Follow these conventions when writing Ruby/Rails code. Full reference: https://github.com/ookamiinc/guides/blob/master/coding_style/rails.md
General Style
- Use American English.
- Use 2-space indentation, no tabs.
- No trailing whitespace. Blank lines should not have any spaces.
- Indent after
private/protected. - Prefer
{ a: :b }over{ :a => :b }(new-style hash syntax). - Prefer
&&/||overand/or. - Use
MyClass.my_method(my_arg)— notmy_method( my_arg )ormy_method my_arg. - Use
a = b— nota=b(spaces around operators). - Prefer
method { do_stuff }overmethod{do_stuff}for single-line blocks. - Follow the conventions already present in the source code.