Redirect Targets are not Orphaned

A pages that is linked-to, via a redirect, is not orphaned.
This commit is contained in:
Jacques Distler 2009-06-06 12:37:00 -05:00
parent 63fde3165e
commit 12207bc01c
3 changed files with 11 additions and 4 deletions

View file

@ -72,6 +72,10 @@ class Page < ActiveRecord::Base
web.select.pages_that_link_to(name)
end
def redirects
wiki_references.select { |ref| ref.redirected_page? }.map { |ref| ref.referenced_name }
end
def included_from
web.select.pages_that_include(name)
end