Forum: Ruby on Rails Rails.cache.fetch("Survey.all") {Survey.all} | Problem only Hash returned, not objects,... nil.incl

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Rafael (Guest)
on 2009-05-26 17:15
(Received via mailing list)
Hello,

does anybody know, how to get objects from the returned Custom Cache?
Actually, everything comes back, but is only a Hash, it seems...

#<Survey id: 11, uid: "006CC623A9B", targeted: "for_me", name:
"ohjlj", description: "<p>kjopo</p>", startdate: "2009-05-30",
enddate: "2009-05-31", status: "building", created_at: "2009-05-24
21:23:30", updated_at: "2009-05-24 21:23:30">

>> @surveys.first.is_a? Survey
>> false


Can anyone help me out here?


Greetings

Rafael
This topic is locked and can not be replied to.