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

Ticket #9000 (closed enhancement: fixed)

Opened 1 year ago

Last modified 1 year ago

[PATCH] Doc for timestamps method of TableDefinition

Reported by: mikong Assigned to: core
Priority: normal Milestone: 2.x
Component: ActiveRecord Version: edge
Severity: normal Keywords: docs
Cc:

Description

Added a concise doc for the timestamps method of the class TableDefinition.

Attachments

doc_tabledefinition_timestamps.diff (0.7 kB) - added by mikong on 07/17/07 04:43:52.

Change History

07/17/07 04:43:52 changed by mikong

  • attachment doc_tabledefinition_timestamps.diff added.

07/17/07 21:57:30 changed by jlindley

+1 Looks good.

(follow-up: ↓ 3 ) 07/18/07 00:56:21 changed by lifofifo

-1.

It's misleading as column type is different for various adapters. E.g postgres uses :timestamp. Don't really think this is needed.

Thanks,

(in reply to: ↑ 2 ) 07/18/07 02:06:01 changed by mikong

Replying to lifofifo:

-1. It's misleading as column type is different for various adapters. E.g postgres uses :timestamp. Don't really think this is needed. Thanks,

In the Short-hand examples section of columns, it actually mentions the same thing. That there's a timestamps method that'll add created_at and updated_at as datetimes. I just thought this description should be present in the timestamps doc.

Btw, whenever I use a method and find that it doesn't have a doc, I always have this urge to write a doc for it. Is it better to leave some methods without a doc if the source code is simple enough?

11/08/07 05:19:49 changed by jeremymcanally

+1

This was confusing for me when it was first put in. Didn't know exactly what t.timestamps was for, and this offers an explanation.

11/11/07 10:31:28 changed by tarmo

+1

12/05/07 14:47:47 changed by marcel

  • status changed from new to closed.
  • resolution set to fixed.

(In [8285]) Document the timestamps schema definition method. Closes #9000 [mikong]