Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

SearchLogic should not be initialized for abstract AR classes #147

Merged
1 commit merged into from

1 participant

@webhoernchen

Abstract AR-Classes have no table and should not be initialized.

Christian Eichhorn * BugFix
 * SearchLogic should not be initialized for abstract classes
22e9065
@ghost ghost merged commit 35bc84f into binarylogic:master
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 5, 2011
  1. * BugFix

    Christian Eichhorn authored
     * SearchLogic should not be initialized for abstract classes
This page is out of date. Refresh to see the latest.
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
Something went wrong with that request. Please try again.