migrate to Rails 4.0 (closes foodcoops#214)

Conflicts:
	Gemfile.lock
This commit is contained in:
wvengen 2014-02-20 15:04:53 +01:00
parent 12d1221bfc
commit 7841245795
97 changed files with 659 additions and 557 deletions

View file

@ -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(/[\"\']/, "")