Class: Junebug::Controllers::Orphans

Inherits:
R
  • Object
show all
Defined in:
lib/junebug/controllers.rb

Instance Method Summary collapse

Instance Method Details

#getObject



138
139
140
141
142
143
144
145
# File 'lib/junebug/controllers.rb', line 138

def get
  @page_title = "Orphan pages"
  @pages = Page.find :all, :order => 'title'
  @pages = @pages.reject do |page|
    linked_pages = Page.find(:all, :conditions => ["body LIKE ? OR body LIKE ?", "%[[#{page.title}]]%", "%[[#{page.title}|%"]).length > 0
  end
  render :orphans
end