This project is archived and is in readonly mode.

Rails core follows the following code conventions and advises you to follow these for code uniformity:

  • Two spaces, no tabs.
  • No trailing whitespace. Blank lines should not have any space
  • Indent after private/protected.
  • MyClass.my_method(my_arg) -- not my_method( my_arg ) or my_method my_arg.
  • Prefer class << self block over self.method for class methods.
  • a = b and not a=b.
  • Don't use and and or for Boolean checks, instead always use && and ||.

Follow the conventions you see used in the source already. These are guidelines: be reasonable; use your best judgement. Thanks.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Tickets have moved to Github

The new ticket tracker is available at https://github.com/rails/rails/issues

Shared Ticket Bins

3.0.2100% complete

 

Completed 640 of 642 tickets

Pages