{"id":19856970,"url":"https://github.com/johnvuko/jt-rails-tokenizable","last_synced_at":"2026-05-11T13:02:32.455Z","repository":{"id":34795517,"uuid":"38779996","full_name":"johnvuko/jt-rails-tokenizable","owner":"johnvuko","description":"Token generation for ActiveRecord models in Ruby On Rails","archived":false,"fork":false,"pushed_at":"2017-03-31T21:09:58.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-29T05:07:52.470Z","etag":null,"topics":[],"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/johnvuko.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":"2015-07-08T21:07:13.000Z","updated_at":"2017-03-31T21:09:56.000Z","dependencies_parsed_at":"2022-07-17T05:30:36.835Z","dependency_job_id":null,"html_url":"https://github.com/johnvuko/jt-rails-tokenizable","commit_stats":null,"previous_names":["johnvuko/jt-rails-tokenizable"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/johnvuko/jt-rails-tokenizable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnvuko%2Fjt-rails-tokenizable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnvuko%2Fjt-rails-tokenizable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnvuko%2Fjt-rails-tokenizable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnvuko%2Fjt-rails-tokenizable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnvuko","download_url":"https://codeload.github.com/johnvuko/jt-rails-tokenizable/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnvuko%2Fjt-rails-tokenizable/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32895978,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"online","status_checked_at":"2026-05-11T02:00:05.975Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":[],"created_at":"2024-11-12T14:17:05.801Z","updated_at":"2026-05-11T13:02:32.420Z","avatar_url":"https://github.com/johnvuko.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JTRailsTokenizable\n\n[![Gem Version](https://badge.fury.io/rb/jt-rails-tokenizable.svg)](http://badge.fury.io/rb/jt-rails-tokenizable)\n\nJTRailsTokenizable generates tokens for ActiveRecord models in Ruby On Rails.\n\n## Installation\n\nJTRailsTokenizable is distributed as a gem, which is how it should be used in your app.\n\nInclude the gem in your Gemfile:\n\n    gem 'jt-rails-tokenizable', '~\u003e 1.0'\n\n## Usage\n\n### Basic usage\n\n```ruby\nclass User \u003c ActiveRecord::Base\n\ttokenize :my_token_field\n\ttokenize :another_token_field, size: 20, validations: false\n\ttokenize :another_token_field, size: 20, only_digits: true\n\t...\nend\n```\n\nYou can change the size of the token (32 by default, which means 64 caracters) and disable the presence and uniqueness validations. The generation of token is using `SecureRandom.hex` or `SecureRandom.random_number` methods.\n\nA new unique token is generated at the creation of the model. You can generate a new token with:\n\n```ruby\nmy_instance.generate_new_token(:my_token_field)\nmy_instance.save\n\n# or directly\n\nmy_instance.generate_new_token!(:my_token_field)\n```\n\n## Author\n\n- [Jonathan Tribouharet](https://github.com/jonathantribouharet) ([@johntribouharet](https://twitter.com/johntribouharet))\n\n## License\n\nJTRailsTokenizable is released under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnvuko%2Fjt-rails-tokenizable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnvuko%2Fjt-rails-tokenizable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnvuko%2Fjt-rails-tokenizable/lists"}