Hi,
I recently added 2 serialized columns in my class Server :
class Server < ActiveRecord::Base
serialize :visa, Hash
serialize :appli, Array
...
No problem in my controller and my application and everything works as
expected : Excel exports following the "visa" Hash or
"appli" Array
are ok.
But since I added the visa Hash, I can''t load the record with such a
serialized column in the console window :
>> s=Server.find_by_nom "a_server"
ActiveRecord::SerializationTypeMismatch: visa was supposed to be a
Hash, but was a String
from D:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/
activerecord-2.0.2/lib/active_record/attribute_methods.rb:244:i
n `unserialize_attribute''
from D:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/
activerecord-2.0.2/lib/active_record/attribute_methods.rb:216:i
n `read_attribute''
from D:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/
activerecord-2.0.2/lib/active_record/base.rb:2152:in `attribute
_for_inspect''
from D:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/
activerecord-2.0.2/lib/active_record/base.rb:2229:in `inspect''
from D:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/
activerecord-2.0.2/lib/active_record/base.rb:2227:in `collect''
from D:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/
activerecord-2.0.2/lib/active_record/base.rb:2227:in `inspect''
from D:/InstantRails-2.0-win/ruby/lib/ruby/1.8/irb.rb:298:in
`output_value''
from D:/InstantRails-2.0-win/ruby/lib/ruby/1.8/irb.rb:151:in
`eval_input''
from D:/InstantRails-2.0-win/ruby/lib/ruby/1.8/irb.rb:259:in
`signal_status''
from D:/InstantRails-2.0-win/ruby/lib/ruby/1.8/irb.rb:147:in
`eval_input''
from D:/InstantRails-2.0-win/ruby/lib/ruby/1.8/irb.rb:146:in
`eval_input''
from D:/InstantRails-2.0-win/ruby/lib/ruby/1.8/irb.rb:70:in
`start''
from D:/InstantRails-2.0-win/ruby/lib/ruby/1.8/irb.rb:69:in
`catch''
from D:/InstantRails-2.0-win/ruby/lib/ruby/1.8/irb.rb:69:in
`start''
from D:/InstantRails-2.0-win/ruby/bin/irb:13
Any Idea ? Is it a bug ?
Thanks a lot for your help.
Come
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---