migrate to Rails 4.0 (closes foodcoops#214)
Conflicts: Gemfile.lock
This commit is contained in:
parent
12d1221bfc
commit
7841245795
97 changed files with 659 additions and 557 deletions
|
|
@ -17,8 +17,8 @@ class Page < ActiveRecord::Base
|
|||
before_validation :update_permalink, :on => :update
|
||||
after_update :create_redirect
|
||||
|
||||
scope :non_redirected, :conditions => {:redirect => nil}
|
||||
scope :no_parent, :conditions => {:parent_id => nil}
|
||||
scope :non_redirected, -> { where(:redirect => nil) }
|
||||
scope :no_parent, -> { where(:parent_id => nil) }
|
||||
|
||||
def self.permalink(title)
|
||||
title.gsub(/[\/\.,;@\s]/, "_").gsub(/[\"\']/, "")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue