This project is archived and is in readonly mode.

#108 ✓resolved
Matthew Boehlig

[PATCH] change_table cleanup

Reported by Matthew Boehlig | May 4th, 2008 @ 07:23 PM

This patch cleans up the changes that were introduced with #71. http://github.com/rails/rails/co...

It affects three areas:

  1. code
  2. documentation
  3. whitespace

1. Code

The documentation said reference/remove_reference could be used (in addition to their plural names) but these methods were missing. Added proper aliases and tests.

2. Documentation

Tried to make things more consistent.

Fixes:

  • Added previously mentioned reference/remove_reference to list of available transformations
  • Pluralized/Singularized Examples depending on number listed
  • Made example descriptions into small headers
  • Removed dangling See that was never completed
  • Changed See to SchemaStatements#add_timestamps as #timestamps doesn't exist
  • Removed single t.removes() example from doc as there is only a singular method makes sense

3. Whitespace

  • Changed sentence spacing from two spaces to one, since it gets collapsed anyways
  • Empty lines and dangling spaces removed in entire schema_definitions.rb file

I tried to make things more consistent and will appreciate feedback:

  • I added reference alias to be consistent with docs, but are all three aliases needed? (reference , references , belong_to) As a sentence, foo references/belongs_to bar sounds proper as "noun verb noun"
  • In contrast, t.removes zig should just be singular to be consistent with the other methods
  • Does the whitespace cleanup in the entire file dilute the focus of main fixes and should it be left to a separate patch?

Patch is attached or available in my fork at: git://github.com/thetamind/rails.git (change_table_doc_fix or master branch)

Comments and changes to this ticket

Create your profile

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

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Pages