diff options
| author | hukl <contact@smyck.org> | 2009-11-17 12:35:04 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-11-17 12:35:04 +0100 |
| commit | bc6080a332806c2d0d359e05aaee2a7865d08673 (patch) | |
| tree | 47e811f99c60a82d0dd6004b257d3a88a3d42652 /app/models/node.rb | |
| parent | c4b8b7f61d0c455aa77f72b96de4ba02ed03aa41 (diff) | |
don't set the published_at upon creation of the first draft but rather on publish
Diffstat (limited to 'app/models/node.rb')
| -rw-r--r-- | app/models/node.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/node.rb b/app/models/node.rb index e9d935a..4f67dcb 100644 --- a/app/models/node.rb +++ b/app/models/node.rb | |||
| @@ -95,7 +95,9 @@ class Node < ActiveRecord::Base | |||
| 95 | def publish_draft! | 95 | def publish_draft! |
| 96 | if self.draft | 96 | if self.draft |
| 97 | self.head = self.draft | 97 | self.head = self.draft |
| 98 | self.head.published_at ||= Time.now | ||
| 98 | self.head.save! | 99 | self.head.save! |
| 100 | |||
| 99 | self.draft = nil | 101 | self.draft = nil |
| 100 | 102 | ||
| 101 | if staged_slug && (staged_slug != slug) | 103 | if staged_slug && (staged_slug != slug) |
