Permalink
Browse files

Merge pull request #147 from webhoernchen/master

SearchLogic should not be initialized for abstract AR classes
  • Loading branch information...
2 parents 67ffef9 + 22e9065 commit 35bc84f36b8e823d9fd80d08b7256bf1e834122f @binarylogic binarylogic committed May 18, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/searchlogic/named_scopes/column_conditions.rb
View
4 lib/searchlogic/named_scopes/column_conditions.rb
@@ -60,7 +60,7 @@ def condition?(name)
# We want to return true for any conditions that can be called, and while we're at it. We might as well
# create the condition so we don't have to do it again.
def respond_to?(*args)
- super || (self != ::ActiveRecord::Base && !create_condition(args.first).blank?)
+ super || (self != ::ActiveRecord::Base && !self.abstract_class? && !create_condition(args.first).blank?)
end
private
@@ -257,4 +257,4 @@ def condition_scope_name(name)
end
end
end
-end
+end

0 comments on commit 35bc84f

Please sign in to comment.