Is there a Ruby, or Activerecord method that can write and read a hash to and from a database field?
I need to write a web utility to accept POST data and save it to a database, then later on pull it from the database in its original hash form. But ideally without 'knowing' what the structure is. In other words, my data store needs to be independent of any particular set of hash keys.
For example, one time the external app might POST to my app:
"user" => "Bill", "city" => "New York" But another time the external app might POST to my app:
"company" => "Foo Inc", "telephone" => "555-5555" So my utility needs to save an arbitrary hash to a text field in the database, then, later, recreate the hash from what was saved.