{"id":15048379,"url":"https://github.com/github/serialized_attributes","last_synced_at":"2025-10-04T08:31:31.182Z","repository":{"id":65974900,"uuid":"14906200","full_name":"github/serialized_attributes","owner":"github","description":"UNMAINTAINED - kind of a bridge between using AR and a full blown schema-free db","archived":true,"fork":true,"pushed_at":"2017-06-21T12:25:36.000Z","size":83,"stargazers_count":9,"open_issues_count":0,"forks_count":11,"subscribers_count":26,"default_branch":"master","last_synced_at":"2024-09-29T00:21:32.690Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"technoweenie/serialized_attributes","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/github.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-03T21:22:22.000Z","updated_at":"2024-07-31T03:19:48.000Z","dependencies_parsed_at":"2023-02-19T18:01:02.851Z","dependency_job_id":null,"html_url":"https://github.com/github/serialized_attributes","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fserialized_attributes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fserialized_attributes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fserialized_attributes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fserialized_attributes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github","download_url":"https://codeload.github.com/github/serialized_attributes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235232585,"owners_count":18957057,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T21:11:13.496Z","updated_at":"2025-10-04T08:31:30.828Z","avatar_url":"https://github.com/github.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UNMAINTAINED\n\nThis repo is no longer being maintained as of 2015-08-25.\n\n---\n\n# SerializedAttributes\n\nSerializedAttributes allows you to add an encoded hash to an ActiveRecord model.  \nThis is similar to the built-in ActiveRecord serialization, except that the field \nis converted to JSON, gzipped, and stored in a BLOB field.  This uses the json\ngem which is much faster than YAML serialization.  However, JSON is not nearly as\nflexible, so you're stuck with strings/integers/dates/etc.\n\nWhere possible, ActiveRecord compatible methods are generated so that a migration \nshould be pretty simple.  See unit tests for examples.\n\nSome of the code and most of the ideas are taken from [Heresy][Heresy], a ruby\nimplementation of [how FriendFeed uses MySQL for schema-free storage][schemafree].\n\nSupports ActiveRecord 2.2 in ruby 1.8.7, and ActiveRecord 2.3-3.1 in ruby 1.9.3.\nSee [Travis CI][travis] to see if we support your version of\nActiveRecord and ruby.\n\n[Heresy]: https://github.com/kabuki/heresy\n[schemafree]: http://bret.appspot.com/entry/how-friendfeed-uses-mysql\n[travis]: http://travis-ci.org/#!/technoweenie/serialized_attributes\n\n## Setup\n\nInstall the plugin into your Rails app.\n\n## Usage\n\n```ruby\nclass Profile \u003c ActiveRecord::Base\n  # assumes #data serializes to raw_data blob field\n  serialize_attributes do\n    string  :title, :description\n    integer :age\n    float   :rank, :percentage\n    time    :birthday\n  end\n\n  # Serializes #data to assumed raw_data blob field\n  serialize_attributes :data do\n    string  :title, :description\n    integer :age\n    float   :rank, :percentage\n    time    :birthday\n  end\n\n  # set the blob field\n  serialize_attributes :data, :blob =\u003e :serialized_field do\n    string  :title, :description\n    integer :age\n    float   :rank, :percentage\n    time    :birthday\n  end\nend\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fserialized_attributes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub%2Fserialized_attributes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fserialized_attributes/lists"}