From 5b06d137fc6143ff679d1ce6048c4149ca23f4e2 Mon Sep 17 00:00:00 2001 From: hukl Date: Sat, 31 Jan 2009 13:05:48 +0100 Subject: connected page and node model + some minor tweaks --- app/models/node.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/models/node.rb') diff --git a/app/models/node.rb b/app/models/node.rb index e2ff973..cac4495 100644 --- a/app/models/node.rb +++ b/app/models/node.rb @@ -1,6 +1,8 @@ class Node < ActiveRecord::Base acts_as_nested_set + has_many :pages + # returns array with pages up to root excluding root def path_to_root parent.nil? && [slug] || parent.path_to_root.push(slug) -- cgit v1.3