Move confirmable config together with other devise configs in user model

This commit is contained in:
Luis Ramos
2020-12-01 17:06:39 +00:00
parent bd6b1dbfed
commit 9abdcd88e5

View File

@@ -1,7 +1,8 @@
module Spree
class User < ActiveRecord::Base
devise :database_authenticatable, :token_authenticatable, :registerable, :recoverable,
:rememberable, :trackable, :validatable, :encryptable, encryptor: 'authlogic_sha512'
:rememberable, :trackable, :validatable,
:encryptable, :confirmable, encryptor: 'authlogic_sha512', reconfirmable: true
has_many :orders
belongs_to :ship_address, foreign_key: 'ship_address_id', class_name: 'Spree::Address'
@@ -39,9 +40,6 @@ module Spree
validate :limit_owned_enterprises
# We use the same options as Spree and add :confirmable
devise :confirmable, reconfirmable: true
class DestroyWithOrdersError < StandardError; end
def self.admin_created?