Remove unused function from Page model
This commit is contained in:
parent
db46f189be
commit
cef951e421
1 changed files with 2 additions and 7 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue