From cef951e421842510139ddfed83499f48021e93c0 Mon Sep 17 00:00:00 2001 From: Patrick Gansterer Date: Fri, 20 Oct 2017 12:08:52 +0200 Subject: [PATCH] Remove unused function from Page model --- plugins/wiki/app/models/page.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/plugins/wiki/app/models/page.rb b/plugins/wiki/app/models/page.rb index 54d4f9f7..bd36e92c 100644 --- a/plugins/wiki/app/models/page.rb +++ b/plugins/wiki/app/models/page.rb @@ -28,10 +28,6 @@ class Page < ActiveRecord::Base permalink == "Home" end - def public_front_page? - permalink == "Public_frontpage" - end - def self.public_front_page where(permalink: "Public_frontpage").first end @@ -41,11 +37,11 @@ class Page < ActiveRecord::Base self.permalink = Page.count == 0 ? "Home" : Page.permalink(title) end end - + def diff current = versions.latest old = versions.where(["page_id = ? and lock_version < ?", current.page_id, current.lock_version]).order('lock_version DESC').first - + if old o = '' Diffy::Diff.new(old.body, current.body).each do |line| @@ -79,4 +75,3 @@ class Page < ActiveRecord::Base end end end -