Created
November 18, 2010 20:37
-
-
Save mtodd/705567 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# #to_json isn't populating the results correctly and a CircularReference error | |
# is getting raised. This makes sure that populate is called first and #to_json | |
# is called on the result array. | |
ThinkingSphinx::Search.class_eval do | |
def as_json(*args) | |
populate | |
@array.as_json(*args) | |
end | |
def to_json(*args) | |
populate | |
@array.to_json(*args) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment