Skip to content

Commit

Permalink
Merge branch 'v1'
Browse files Browse the repository at this point in the history
  • Loading branch information
pat committed Sep 6, 2012
2 parents 67e1684 + b704446 commit e83018c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/thinking_sphinx/facet.rb
Expand Up @@ -104,7 +104,14 @@ def translate(object, attribute_value)
method = value_source || column.__name
object = objects.one? ? objects.first : objects.detect { |item|
result = item.send(method)
result && result.to_crc32 == attribute_value
case result
when String
result.to_crc32 == attribute_value
when NilClass
false
else
result == attribute_value
end
}

object.try(method)
Expand Down

0 comments on commit e83018c

Please sign in to comment.