From acc9301696de3589a17d1543a7ab3fc1914e8ce8 Mon Sep 17 00:00:00 2001 From: hukl Date: Tue, 7 Apr 2009 22:03:46 +0200 Subject: made this line a little easier to understand. thanks to @handtwerk --- app/models/node.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/node.rb') 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 # returns array with pages up to root excluding root def path_to_root - parent.nil? && [slug] || parent.path_to_root.push(slug) + parent.nil? ? [slug] : parent.path_to_root.push(slug) end def update_unique_name -- cgit v1.3