From 02430fc98ee9af4ea810475bbcb5cf55615445c6 Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Fri, 10 Jan 2014 11:21:52 -0300 Subject: [PATCH] rails3: change named_scope call on spammable module --- lib/spammable.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/spammable.rb b/lib/spammable.rb index 553c68d..eff1206 100644 --- a/lib/spammable.rb +++ b/lib/spammable.rb @@ -10,10 +10,10 @@ module Spammable module ClassMethods def self.extended (base) - if base.respond_to?(:named_scope) + if base.respond_to?(:scope) base.class_eval do - named_scope :without_spam, :conditions => ['spam IS NULL OR spam = ?', false] - named_scope :spam, :conditions => ['spam = ?', true] + scope :without_spam, :conditions => ['spam IS NULL OR spam = ?', false] + scope :spam, :conditions => ['spam = ?', true] end end end -- libgit2 0.21.2