Commit cd87d7ce by Mai Hoang Thai Ha

remove devise invitable

parent 570fcd3b
......@@ -66,4 +66,3 @@ gem 'httparty', '~> 0.18.1'
gem 'active_storage_validations', '~> 0.9.5'
gem 'devise', '~> 4.8'
gem 'jquery-rails', '~> 4.4'
gem 'devise_invitable', '~> 2.0', '>= 2.0.5'
\ No newline at end of file
......@@ -109,9 +109,6 @@ GEM
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
devise_invitable (2.0.5)
actionmailer (>= 5.0)
devise (>= 4.6)
erubi (1.10.0)
ffi (1.15.3)
globalid (0.4.2)
......@@ -293,7 +290,6 @@ DEPENDENCIES
byebug
capybara (>= 3.26)
devise (~> 4.8)
devise_invitable (~> 2.0, >= 2.0.5)
httparty (~> 0.18.1)
jbuilder (~> 2.7)
jquery-rails (~> 4.4)
......
class User < ApplicationRecord
ACCEPT_CONTENT_TYPE = 'application/pdf, application/msword, application/zip, application/xls, application/xlsx'.freeze
devise :invitable, :database_authenticatable, :registerable,
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :validatable, :confirmable
has_many :apply_jobs, dependent: :destroy
......
......@@ -58,8 +58,6 @@ javascript:
errorSelector: '.form-msg',
rules: [
Validator.isRequired('#user_name'),
Validator.isRequired('#user_address'),
Validator.isRequired('#user_phone'),
Validator.isRequired('#user_password'),
Validator.isRequired('#user_password_confirmation'),
Validator.isConfirmed('#user_password_confirmation', function () {
......
......@@ -138,7 +138,7 @@ Devise.setup do |config|
# The period the generated invitation token is valid.
# After this period, the invited resource won't be able to accept the invitation.
# When invite_for is 0 (the default), the invitation won't expire.
config.invite_for = 24.hours
# config.invite_for = 24.hours
# Number of invitations users can send.
# - If invitation_limit is nil, there is no limit for invitations, users can
......
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"
......@@ -8,6 +8,5 @@ class RemoveFieldFromUsers < ActiveRecord::Migration[6.1]
remove_column :users, :activated_at, :datetime
remove_column :users, :password_reset_digest, :string
remove_column :users, :password_reset_sent_at, :datetime
end
end
class RemoveDeviseInvitable < ActiveRecord::Migration[6.1]
def change
def change
remove_column :users, :invitation_token, :string
remove_column :users, :invitation_created_at, :datetime
remove_column :users, :invitation_sent_at, :datetime
remove_column :users, :invitation_accepted_at, :datetime
remove_column :users, :invitation_limit, :integer
remove_references :users, :invited_by, :references
remove_column :users, :invitations_count, :integer
remove_column :users, :invitation_token, :index
remove_column :users, :invited_by_id, :index
end
end
end
......@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2021_08_24_082155) do
ActiveRecord::Schema.define(version: 2021_09_01_065858) do
create_table "active_storage_attachments", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "name", null: false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment