Saturday, 15 June 2013

How to stop rails from parsing json postgresql field to hash -


I tell you about railing that to parse Jason and JSNB PostGerscall Columns in a different class or simply stop To parse it as a hash because I will not use hash.

I use read_attribute_before_type_cast , but this kind of cast is useless for my application.

Thanks

This is my search, it is not complete, but my problem Resolve

  Serialize: Profile, hashializer  

I found a serializer / serializer to deal with Jason Column.

and the serializer is defined as:

  class hashcieriser def self.dump (hash) hash.to_son's end DEF self.load (hash) (hash | | {}) With_indifferent_access End End  

No comments:

Post a Comment