-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
90ee42a
commit 80d0e1c
Showing
4 changed files
with
103 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
en: | ||
devise: | ||
failure: | ||
invited: "You have a pending invitation, accept it to finish creating your account." | ||
invitations: | ||
send_instructions: "An invitation email has been sent to %{email}." | ||
invitation_token_invalid: "The invitation token provided is not valid!" | ||
updated: "Your password was set successfully. You are now signed in." | ||
updated_not_active: "Your password was set successfully." | ||
no_invitations_remaining: "No invitations remaining" | ||
invitation_removed: "Your invitation was removed." | ||
new: | ||
header: "Send invitation" | ||
submit_button: "Send an invitation" | ||
edit: | ||
header: "Set your password" | ||
submit_button: "Set my password" | ||
mailer: | ||
invitation_instructions: | ||
subject: "Invitation instructions" | ||
hello: "Hello %{email}" | ||
someone_invited_you: "Someone has invited you to %{url}, you can accept it through the link below." | ||
accept: "Accept invitation" | ||
accept_until: "This invitation will be due in %{due_date}." | ||
ignore: "If you don't want to accept the invitation, please ignore this email. Your account won't be created until you access the link above and set your password." | ||
time: | ||
formats: | ||
devise: | ||
mailer: | ||
invitation_instructions: | ||
accept_until_format: "%B %d, %Y %I:%M %p" |
22 changes: 22 additions & 0 deletions
22
spotlight/db/migrate/20220614231033_devise_invitable_add_to_users.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
class DeviseInvitableAddToUsers < ActiveRecord::Migration[5.2] | ||
def up | ||
change_table :users do |t| | ||
t.string :invitation_token | ||
t.datetime :invitation_created_at | ||
t.datetime :invitation_sent_at | ||
t.datetime :invitation_accepted_at | ||
t.integer :invitation_limit | ||
t.references :invited_by, polymorphic: true | ||
t.integer :invitations_count, default: 0 | ||
t.index :invitation_token, unique: true # for invitable | ||
t.index :invited_by_id | ||
end | ||
end | ||
|
||
def down | ||
change_table :users do |t| | ||
t.remove_references :invited_by, polymorphic: true | ||
t.remove :invitations_count, :invitation_limit, :invitation_sent_at, :invitation_accepted_at, :invitation_token, :invitation_created_at | ||
end | ||
end | ||
end |