diff options
| author | hukl <contact@smyck.org> | 2009-04-07 22:03:46 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-04-07 22:03:46 +0200 |
| commit | acc9301696de3589a17d1543a7ab3fc1914e8ce8 (patch) | |
| tree | b82b1c7eaa70efef8f50ce6b41416413e98e580a /app/models | |
| parent | 39671a357fcc410687ceeeb27ae51e0a926cd5ec (diff) | |
made this line a little easier to understand. thanks to @handtwerk
Diffstat (limited to 'app/models')
| -rw-r--r-- | app/models/node.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/node.rb b/app/models/node.rb index 8b7fe62..b56dff5 100644 --- a/app/models/node.rb +++ b/app/models/node.rb | |||
| @@ -88,7 +88,7 @@ class Node < ActiveRecord::Base | |||
| 88 | 88 | ||
| 89 | # returns array with pages up to root excluding root | 89 | # returns array with pages up to root excluding root |
| 90 | def path_to_root | 90 | def path_to_root |
| 91 | parent.nil? && [slug] || parent.path_to_root.push(slug) | 91 | parent.nil? ? [slug] : parent.path_to_root.push(slug) |
| 92 | end | 92 | end |
| 93 | 93 | ||
| 94 | def update_unique_name | 94 | def update_unique_name |
