diff options
author | Louise Crow <louise.crow@gmail.com> | 2015-05-28 12:38:43 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2015-05-28 12:38:43 +0100 |
commit | b9ebcb7c223a2377d582589840ea8bb72cb5f654 (patch) | |
tree | c6f540849c4f086c5032c6dfbf7622a028d107c4 /lib | |
parent | 07b8c95e66d8709b4bfbc52443ea227ff43097db (diff) | |
parent | 8a831333d28bc4bb33631c8a31934c2313ddc912 (diff) |
Merge branch 'hotfix/0.21.0.33' into rails-3-develop
Diffstat (limited to 'lib')
-rw-r--r-- | lib/acts_as_xapian/acts_as_xapian.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/acts_as_xapian/acts_as_xapian.rb b/lib/acts_as_xapian/acts_as_xapian.rb index 565212904..e0c7c6ae7 100644 --- a/lib/acts_as_xapian/acts_as_xapian.rb +++ b/lib/acts_as_xapian/acts_as_xapian.rb @@ -379,7 +379,10 @@ module ActsAsXapian if correction.empty? return nil end - return correction + if correction.respond_to?(:force_encoding) + correction = correction.force_encoding('UTF-8') + end + correction end # Return array of models found |