Commit 02430fc98ee9af4ea810475bbcb5cf55615445c6
1 parent
5b76a428
Exists in
master
and in
27 other branches
rails3: change named_scope call on spammable module
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
lib/spammable.rb
... | ... | @@ -10,10 +10,10 @@ module Spammable |
10 | 10 | |
11 | 11 | module ClassMethods |
12 | 12 | def self.extended (base) |
13 | - if base.respond_to?(:named_scope) | |
13 | + if base.respond_to?(:scope) | |
14 | 14 | base.class_eval do |
15 | - named_scope :without_spam, :conditions => ['spam IS NULL OR spam = ?', false] | |
16 | - named_scope :spam, :conditions => ['spam = ?', true] | |
15 | + scope :without_spam, :conditions => ['spam IS NULL OR spam = ?', false] | |
16 | + scope :spam, :conditions => ['spam = ?', true] | |
17 | 17 | end |
18 | 18 | end |
19 | 19 | end | ... | ... |