Slide 17
Slide 17 text
module Devise::Models::Confirmable
extend ActiveSupport::Concern
included do
before_create :generate_confirmation_token, if: :confirmation_required?
after_create :skip_reconfirmation_in_callback!, if: :send_confirmation_notification?
if defined?(ActiveRecord) && self < ActiveRecord::Base # ActiveRecord
after_commit :send_on_create_confirmation_instructions,
on: :create, if: :send_confirmation_notification?
after_commit :send_reconfirmation_instructions,
on: :update, if: :reconfirmation_required?
else # Mongoid
# ...
end
before_update :postpone_email_change_until_confirmation_and_regenerate_confirmation_token,
if: :postpone_email_change?
end
࠶֬ೝ͕ඞཁͩͬͨΒ
Devise
ϝʔϧͷมߋΛԆظ͢Δ
ϝʔϧૹ৴
ৗʹfalse