Skip to content
This repository has been archived by the owner on Sep 27, 2022. It is now read-only.

Commit

Permalink
Check for existence of :named_scope? before defining one
Browse files Browse the repository at this point in the history
  • Loading branch information
rickbutton committed Dec 6, 2013
1 parent 41aa85e commit 1d22e08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fuzzily/searchable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ module Rails2ClassMethods
def self.extended(base)
base.class_eval do
named_scope :offset,
lambda { |*args| { :offset => args.first } }
lambda { |*args| { :offset => args.first } } if respond_to? :named_scope
end
end

Expand Down

0 comments on commit 1d22e08

Please sign in to comment.