登录 注册

devise_invitable

去点 Star
其他
2,671
Stars
—
Forks
0
Watchers
—
Open Issues
待补全
许可证
Ruby
语言
—
创建时间
最近更新

项目能做什么

Devise 的用户邀请策略扩展插件。
来源:基于仓库元数据 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
# DeviseInvitable
[<img src="https://badge.fury.io/rb/devise_invitable.svg"/>](http://badge.fury.io/rb/devise_invitable) [<img
src="https://github.com/scambra/devise_invitable/actions/workflows/ci.yml/badg
e.svg"/>](https://github.com/scambra/devise_invitable/actions/workflows/ci.yml
) [<img
src="https://codeclimate.com/github/scambra/devise_invitable/badges/gpa.svg"/>
](https://codeclimate.com/github/scambra/devise_invitable)

It adds support to [Devise](https://github.com/plataformatec/devise) for
sending invitations by email (it requires to be authenticated) and accept the
invitation setting the password.

## Requirements

The latest version of DeviseInvitable requires Ruby >= 2.7, Rails >= 7.0,
and Devise >= 5.0.

Use DeviseInvitable 2.x with Devise 4.6 through 4.9. For earlier Devise 4
releases, use DeviseInvitable 1.7.5.

## Installation

Install DeviseInvitable gem:

```shell
gem install devise_invitable
```

Add DeviseInvitable to your Gemfile:

```ruby
gem 'devise_invitable', '~> 3.0'
```

### Automatic installation

Run the following generator to add DeviseInvitable’s configuration option in
the Devise configuration file (`config/initializers/devise.rb`):

```shell
rails generate devise_invitable:install
```

When you are done, you are ready to add DeviseInvitable to any of your Devise
models using the following generator:

```shell
rails generate devise_invitable MODEL
```

Replace MODEL by the class name you want to add DeviseInvitable, like `User`,
`Admin`, etc. This will add the `:invitable` flag to your model's Devise
modules. The shared invitations table is created by the install generator, so
the model generator does not create a migration.

### Manual installation

Follow the walkthrough for Devise and after it's done, follow this
walkthrough.

#### Devise Configuration
Add `:invitable` to the `devise` call in your model (we’re assuming here you
already have a User model with some Devise modules):

```ruby
class User < ActiveRecord::Base
  devise :database_authenticatable, :confirmable, :invitable
end
```

#### Active Record schema

Invitations are stored in the shared `devise_invitations` table generated by
`devise_invitable:install`. It contains the token and lifecycle timestamps,
the configured invite keys, and polymorphic `invitable` and `invited_by`
associations. Invitation columns are not added to each Devise model.

Run the generated migration:

```shell
rails db:migrate
```

Mongoid applications upgrading from 3.0.0 through 3.1.0 can clear existing
terminal digests without a schema migration:

```console
rails devise_invitable:clear_terminal_invitation_digests
```

#### Upgrading from resource-backed invitation columns

Generate one upgrade migration for every model that already uses
`:invitable`:

```shell
rails generate devise_invitable:upgrade User
rails db:migrate
```

Pass every configured invite key when it is not just `email`:

```shell
rails generate devise_invitable:upgrade User --invite-keys email username
```
阅读完整原文

项目深度分析 规则生成(AI 未配置)

综合评分 43.4 分。该项目在“个人可实施性”维度得 45 分,“付费可能性”维度得 20.0 分,差异化空间 70.0 分(评分依据见评分卡)。

面向细分需求的二次开发产品

产品构想基于 devise_invitable 的核心能力,聚焦一个更窄的场景(如某平台、某行业)做差异化。
目标用户该细分场景用户
难度/周期中 · 2~6 周
收费模式买断制 / 订阅制 / 广告
竞争风险细分需求规模需验证
依据 AI 推测:基于项目主题标签的判断
以上为规则引擎基于仓库公开数据生成的参考结论,包含推测成分,不构成投资或创业承诺;配置 AI 后可获得更深入的分析。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

项目中文简介Stars语言
platanus/admin-invitable 中文介绍暂未生成
Gem to use devise invitable with ActiveAdmin.
10 Ruby
corsego/40-devise-everything 中文介绍暂未生成
Episodes 40,41,42,43 Devise invitable, confirmable, lockable
3 Ruby
vreys/remarkable_devise_invitable 中文介绍暂未生成
Remarkable RSpec matchers for devise_invitable models
2 Ruby
ivliaspiration/rails_authorization_with_devise_invitable_and_cancan 中文介绍暂未生成
Role-based authorization with Devise, devise_invitable, and
2 Ruby
Expenza/devise_invitable 中文介绍暂未生成
2 Ruby
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。

项目优势与风险

技术成熟度创建时间待补全,最近推送
社区活跃Star 2,671 / Fork 0 / Issue 0(数据支持,可自行核实)
许可证未检测到(需人工确认)
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

此项目未提供 Docker 镜像,安装步骤以原仓库 README 为准(涉及依赖安装与环境配置,对新手门槛较高)。