Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #10124 (new enhancement)

Opened 1 year ago

Last modified 1 year ago

[PATCH] Documentation for ActiveSupport::CoreExtensions::Array::Conversions

Reported by: jeremymcanally Assigned to: core
Priority: normal Milestone: 2.x
Component: ActiveSupport Version: edge
Severity: normal Keywords: docs
Cc: revans

Description

Enhances existing documentation.

Attachments

as_array_docs.diff (3.7 kB) - added by jeremymcanally on 11/09/07 15:37:17.
Doc patch
as_array_docs.2.diff (5.3 kB) - added by kampers on 11/29/07 18:36:57.
as_array_docs.3.diff (5.4 kB) - added by jeremymcanally on 12/05/07 14:58:32.
as_array_docs.4.diff (6.4 kB) - added by revans on 12/05/07 16:51:00.
as_array_docs.5.diff (6.8 kB) - added by kampers on 12/11/07 18:56:10.

Change History

11/09/07 15:37:17 changed by jeremymcanally

  • attachment as_array_docs.diff added.

Doc patch

11/09/07 22:50:48 changed by jamesh

+1 definitely!

11/11/07 10:29:56 changed by tarmo

+1, but why is to_sentence examples indentation different from the other examples?

11/29/07 18:36:09 changed by kampers

  • keywords set to docs.
  • summary changed from [PATCH][DOCS] Documentation for ActiveSupport::CoreExtensions::Array::Conversions to [PATCH] Documentation for ActiveSupport::CoreExtensions::Array::Conversions.

Hey, I decided to do some cleanup (and add some more info) when I was reviewing this. Changes:

  • Changed method descriptions to say "returns ..." instead of "converts" since they're not bang methods
  • Fixed indentation re: tarmo's suggestion
  • Wrapped docs to 80 chars where possible
  • Added more info and another example about the other to_xml options: :dasherize, :skip_instruct, :skip_types, and the ability to call with a block; cleaned up and rewrote descriptions for other options
  • Changed your beets example a bit since, I think, carrots aren't beets? First time I've looked up vegetables on Wikipedia while working on a Rails patch, that's for sure.
  • Other miscellaneous monospacing and wording
  • Updated for edge.

Hope this helps.

11/29/07 18:36:57 changed by kampers

  • attachment as_array_docs.2.diff added.

12/05/07 14:33:32 changed by marcel

These look good but I'm afraid the patch doesn't apply cleanly anymore. I'll be glad to apply an updated patch.

12/05/07 14:57:07 changed by jeremymcanally

OK, cool. Let me upload a clean patch...

12/05/07 14:58:32 changed by jeremymcanally

  • attachment as_array_docs.3.diff added.

12/05/07 16:51:00 changed by revans

  • attachment as_array_docs.4.diff added.

12/05/07 16:52:17 changed by revans

added documentation for to_formatted_s. I had another ticket open for this addition, as well to_xml. Figured it is best to combine these efforts by adding to_formatted_s to your work done here.

12/05/07 22:00:49 changed by revans

  • cc set to revans.

12/11/07 17:21:02 changed by revans

  • keywords changed from docs to verified.

+1

12/11/07 17:26:03 changed by kampers

  • keywords deleted.

Don't +1 and verify your own patch :)

Seriously, though, I need to fix some consistency problems with the new to_formatted_s addition. I'll do that in a sec and put up a new patch. Then, let's get one of the previous verifiers (or someone new) to do another verification.

I've been meaning to do this for a week now and it got back-burnered. Sorry about that.

12/11/07 18:30:20 changed by revans

hehe, sorry about that. :)

12/11/07 18:55:25 changed by kampers

  • keywords set to docs.

OK, here we go. I rewrote the to_formatted_s docs to be more consistent with the other methods. I think it's a little more clear and concise, too. And, no more spelling or grammar errors ("behavious" etc.).

Also applies cleanly again.

Let's get another verifier in here to test this out, and then we can go forward.

12/11/07 18:56:10 changed by kampers

  • attachment as_array_docs.5.diff added.