Permalink
Browse files

change open file way

  • Loading branch information...
chebyte committed Aug 13, 2011
1 parent e40bcb4 commit 86dee3c113ee20069c7bcad17f7163d7a42eeb2d
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/sunspot/rich_document.rb
@@ -22,7 +22,7 @@ def add(connection)
@fields.each do |f|
if f.name.to_s.include?("_attachment") and f.value.present?
- data = f.value.data
+ data = open(f.value).read rescue ""
params['fmap.content'] = f.name
else
param_name = "literal.#{f.name.to_s}"

0 comments on commit 86dee3c

Please sign in to comment.