diff options
Diffstat (limited to 'app/models/node.rb')
| -rw-r--r-- | app/models/node.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/models/node.rb b/app/models/node.rb index 44f352a..33c82c9 100644 --- a/app/models/node.rb +++ b/app/models/node.rb | |||
| @@ -117,9 +117,10 @@ class Node < ActiveRecord::Base | |||
| 117 | 117 | ||
| 118 | protected | 118 | protected |
| 119 | 119 | ||
| 120 | # Creates an empty page, associates it to the given node and sets its | 120 | # Creates an empty page and associates it to the given node. This means |
| 121 | # published_at date so it isn't considered a draft. Look up the draft | 121 | # freshly created node has an empty draft. A user can create nodes as he |
| 122 | # method! | 122 | # wants to which will not appear on the public page until the author edits |
| 123 | # that draft and publishes it. | ||
| 123 | def initialize_empty_page | 124 | def initialize_empty_page |
| 124 | if self.pages.empty? | 125 | if self.pages.empty? |
| 125 | self.pages.create! | 126 | self.pages.create! |
