Hide redirected pages in collection for parent ids.
This commit is contained in:
parent
65e41efc18
commit
c3ca3e23f9
3 changed files with 4 additions and 2 deletions
|
|
@ -30,6 +30,8 @@ class Page < ActiveRecord::Base
|
|||
before_validation_on_update :update_permalink
|
||||
after_update :create_redirect
|
||||
|
||||
named_scope :non_redirected, :conditions => {:redirect => nil}
|
||||
|
||||
def self.permalink(title)
|
||||
title.gsub(/[\/\.,;@\s]/, "_").gsub(/[\"\']/, "")
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue