Saturday, November 5, 2011

[Rails] Re: Rails.cache.read unmarshal everything as string

I would like to add a further notice that the problem seems to occur
only with Rails ActiveRecord model. I have no problem unmarshalling a
Date class.

irb(main):005:0> d = Date.new
=> Mon, 01 Jan -4712
irb(main):006:0> Rails.cache.write "date", d
=> true
irb(main):007:0> x = Rails.cache.read "date"
=> Mon, 01 Jan -4712
irb(main):008:0> x.class
=> Date

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate