Brad
unread,May 12, 2011, 1:36:57 PM5/12/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to SimpleRecord
I have a model:
class Faq < SimpleRecord::Base
has_strings :question
has_clobs :answer
#sr_config :single_clob=>true
end
@faqs = Faq.find(:all)
@faqs.first.answer # This gives me "lobs/2f45cf06-7cbb-11e0-
bf9e-70cd60fffe52_answer"
I would expect the return value of @faqs.first.answer to be the actual
string value; not the key to where it is in S3. Looking at the code,
this it what it looks like it is attempting to do as well. Any idea
what I am doing wrong?
Here is my connection string:
SimpleRecord.establish_connection(id, key, :connection_mode
=> :per_thread, :s3_bucket => :new)
As you can see from the commented out sr_config line, I have tried it
with this as well. When I used this, I saved new model data before
attempting to fetch. When this option is enabled, I get:
can't convert Aws::S3::Key into String
I have manually verified that the file exists on S3 and has the
correct data. It looks like saving is working correctly.