{"id":19150047,"url":"https://github.com/smashingboxes/activerecord-diff","last_synced_at":"2025-06-24T22:42:48.170Z","repository":{"id":1461847,"uuid":"1698098","full_name":"smashingboxes/activerecord-diff","owner":"smashingboxes","description":"Simple ActiveRecord diff functionality","archived":false,"fork":false,"pushed_at":"2011-05-04T01:02:19.000Z","size":444,"stargazers_count":1,"open_issues_count":0,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-07T05:06:05.871Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smashingboxes.png","metadata":{"files":{"readme":"README.txt","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-05-03T20:30:10.000Z","updated_at":"2021-05-19T20:31:22.000Z","dependencies_parsed_at":"2022-07-29T14:18:56.840Z","dependency_job_id":null,"html_url":"https://github.com/smashingboxes/activerecord-diff","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smashingboxes%2Factiverecord-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smashingboxes%2Factiverecord-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smashingboxes%2Factiverecord-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smashingboxes%2Factiverecord-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smashingboxes","download_url":"https://codeload.github.com/smashingboxes/activerecord-diff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252817010,"owners_count":21808705,"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-11-09T08:10:28.191Z","updated_at":"2025-05-07T05:06:15.085Z","avatar_url":"https://github.com/smashingboxes.png","language":"Ruby","readme":"Simple ActiveRecord diff functionality.\n\nExample usage:\n\n  require 'active_record/diff'\n\n  class User \u003c ActiveRecord::Base\n    include ActiveRecord::Diff\n  end\n\n  alice = User.create(:name =\u003e 'alice', :email_address =\u003e 'alice@example.org')\n\n  bob = User.create(:name =\u003e 'bob', :email_address =\u003e 'bob@example.org')\n\n  alice.diff?(bob)  # =\u003e true\n\n  alice.diff(bob)  # =\u003e {:name =\u003e ['alice', 'bob'], :email_address =\u003e ['alice@example.org', 'bob@example.org']}\n\n  alice.diff({:name =\u003e 'eve'})  # =\u003e {:name =\u003e ['alice', 'eve']}\n  \nMultiple objects can also be compared. Example:\n\n  eve = User.create(:name =\u003e 'eve', :email_address =\u003e 'bob@example.org')\n  \n  alice.diff?([bob, eve])  # =\u003e true\n  \n  alice.diff([bob, eve])  # =\u003e { :name =\u003e ['alice', 'bob', 'eve'], :email_address =\u003e ['alice@example.org', 'bob@example.org'] }\n\n\nBy default, ActiveRecord::Base.content_columns is used to decide which attributes\nto compare. You can include or exclude attributes from this as follows:\n\n  class User \u003c ActiveRecord::Base\n    diff :include =\u003e [:id], :exclude =\u003e [:password_hash]\n  end\n\n\nAlternatively, you can specify exactly which columns to compare:\n\n  class User \u003c ActiveRecord::Base\n    diff :id, :name, :email_address\n  end\n\n\nThis is an updated version of the \"riff\" rails plugin.\n\n\nTo the extent possible under law, Tim Fletcher has waived all copyright and\nrelated or neighboring rights to activerecord-diff. This work is published\nfrom the United Kingdom. http://creativecommons.org/publicdomain/zero/1.0/\n\nContributions\n\n- Zachary Porter ( zporter )\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmashingboxes%2Factiverecord-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmashingboxes%2Factiverecord-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmashingboxes%2Factiverecord-diff/lists"}