{"id":18336378,"url":"https://github.com/launchpadlab/lp_confirmable","last_synced_at":"2025-04-09T19:55:35.723Z","repository":{"id":147465405,"uuid":"81109591","full_name":"LaunchPadLab/lp_confirmable","owner":"LaunchPadLab","description":"Simple confirmable logic for Rails apps","archived":false,"fork":false,"pushed_at":"2017-03-07T17:28:36.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T19:55:23.935Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/LaunchPadLab.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-06T16:53:43.000Z","updated_at":"2017-02-06T16:54:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"e4e4005d-1520-48f3-830a-174f0bce7f87","html_url":"https://github.com/LaunchPadLab/lp_confirmable","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/LaunchPadLab%2Flp_confirmable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaunchPadLab%2Flp_confirmable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaunchPadLab%2Flp_confirmable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaunchPadLab%2Flp_confirmable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LaunchPadLab","download_url":"https://codeload.github.com/LaunchPadLab/lp_confirmable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103911,"owners_count":21048245,"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-05T20:07:44.684Z","updated_at":"2025-04-09T19:55:35.704Z","avatar_url":"https://github.com/LaunchPadLab.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LP Confirmable\nSimple confirmable logic for Rails apps. No baked in routing or mailers, just the barebones logic and migration you need to implement confirmable logic for your users.\n\n## Installation\nAdd `gem 'lp_confirmable',  github: 'launchpadlab/lp_confirmable'` to your Gemfile and run `bundle install`.\n\n## Usage\nFor the purposes of these instructions, I will assume the model you are using is 'User' but it could be anything you want.\n\n1. Generate a migration to add the required fields to the model of your choice with `bundle exec rails generate lp_confirmable:model User`\n2. Run the migration with `bundle exec rails db:migrate`. This adds three columns to your table: `confirmation_token`, `confirmed_at`, and `confirmation_sent_at`.\n3. When you want to start the process, assume you have created a `user`, then call `LpConfirmable::Model.set_confirmation_token! user`. This will return the token that you can share with the client via email, link, smoke-signals, whatever.\n4. While you are in charge of sending confirmation instructions, `lp_confirmable` still needs to track it, so when you are ready call\n```\nLpConfirmable::Model.send_confirmation_instructions! user do\n    \u003cinsert your logic here\u003e\nend\n```\nand 'lp_confirmable' will take care of the rest.\n\n5. To confirm a user, call `LpConfirmable::Model.confirm_by_token!(User, confirmation_token)`. This will find the user by confirmation token and confirm them, returning the user model.\n6. Any errors that pop up along the way, such as trying to confirm a non-confirmable object, or an expired token, etc..., will throw an `LpConfirmable::Error`.\n7. To change the global defaults run `bundle exec rails generate lp_confirmable:install` to generate an initializer at `../config/initalizers/lp_confirmable.rb`. See the initializer for more details.\n\n## Development\n+ `git clone git@github.com:LaunchPadLab/lp_confirmable.git`\n+ `bundle install`\n+ Test with `rake`\n\n## Confirm away!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaunchpadlab%2Flp_confirmable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaunchpadlab%2Flp_confirmable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaunchpadlab%2Flp_confirmable/lists"}