{"id":29899352,"url":"https://github.com/patorash/acts_as_footprintable","last_synced_at":"2025-08-01T12:34:35.312Z","repository":{"id":554743,"uuid":"13211064","full_name":"patorash/acts_as_footprintable","owner":"patorash","description":"Rails gem to allowing records to leave footprints","archived":false,"fork":false,"pushed_at":"2025-06-19T04:43:17.000Z","size":349,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-19T05:34:58.899Z","etag":null,"topics":["activerecord","rails","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/patorash.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-09-30T09:20:14.000Z","updated_at":"2025-06-19T04:43:20.000Z","dependencies_parsed_at":"2022-08-06T09:15:46.088Z","dependency_job_id":null,"html_url":"https://github.com/patorash/acts_as_footprintable","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/patorash/acts_as_footprintable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patorash%2Facts_as_footprintable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patorash%2Facts_as_footprintable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patorash%2Facts_as_footprintable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patorash%2Facts_as_footprintable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patorash","download_url":"https://codeload.github.com/patorash/acts_as_footprintable/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patorash%2Facts_as_footprintable/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266341410,"owners_count":23914227,"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","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["activerecord","rails","ruby"],"created_at":"2025-08-01T12:33:47.655Z","updated_at":"2025-08-01T12:34:35.304Z","avatar_url":"https://github.com/patorash.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ActsAsFootprintable\n\n[![Test](https://github.com/patorash/acts_as_footprintable/actions/workflows/test.yml/badge.svg)](https://github.com/patorash/acts_as_footprintable/actions/workflows/test.yml)\n\nActs As Footprintable is a Ruby Gem specifically written for Rails/ActiveRecord models.\nThe main goals of this gem are:\n\n- Allow any model to leave footprints\n- Get access ranking for footprintable model\n- Get access histories by footprinter model\n\n\n## Installation\n\n### Rails 5.x, 6.x and 7.0\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'acts_as_footprintable', '~\u003e 0.6.0'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install acts_as_footprintable\n\n### Database Migrations\n\nActs As Footprintable uses a footprints table to store all footprints information.\nTo generate and run the migration just use.\n\n    $ rails generate acts_as_footprintable:migration\n    $ rake db:migrate\n\n## Usage\n\n### Footprintable models\n\n```ruby\nclass Post \u003c ActiveRecord::Base\n  acts_as_footprintable\nend\n\n@post = Post.create(name: 'my post!')\n\n@post.leave_footprints @user\n@post.footprints.size # =\u003e 1\n```\n\n### Footprintable model access ranking\n\n```ruby\n# Total access ranking\ntotal_ranking = Post.access_ranking\n\n# Span access ranking\nmonthly_ranking = Post.access_ranking(1.month.ago.beginning_of_month..1.month.ago.end_of_month)\n\n# Limit access ranking\nmonthly_top10_ranking = Post.access_ranking(1.month.ago.beginning_of_month..1.month.ago.end_of_month, 10)\n# =\u003e {footprintable_id =\u003e count, ...}\n```\n\n### Footprinter models\n\n```ruby\nclass User \u003c ActiveRecord::Base\n  acts_as_footprinter\nend\n\n@user.leave_footprints @post\n@post.footprints.size # =\u003e 1\n```\n\n### Footprinter model access histories\n\n```ruby\n# Total access histories\ntotal_access_histories = @user.access_histories\n# Limited total access histories\ntotal_access_histories = @user.access_histories(10)\n\n# Post access histories\npost_access_histories = @user.access_histories_for Post\n# Limited Post access histories\npost_access_histories = @user.access_histories_for(Post, 10)\n```\n\n## Testing\n\n    $ bundle exec rake\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatorash%2Facts_as_footprintable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatorash%2Facts_as_footprintable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatorash%2Facts_as_footprintable/lists"}