Sha256: ed7edd4153a89050b9121062e9dc5294d2395832cf4bd2c2a3a82b874c47b136

Contents?: true

Size: 584 Bytes

Versions: 27

Compression:

Stored size: 584 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module System
    # Admins are the users in charge of managing a Decidim installation.
    class Admin < ApplicationRecord
      devise :database_authenticatable, :validatable, :timeoutable

      validates :email, uniqueness: true

      validates :password, password: { email: :email }

      private

      # Changes default Devise behaviour to use ActiveJob to send async emails.
      def send_devise_notification(notification, *args)
        devise_mailer.send(notification, self, *args).deliver_later
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
decidim-system-0.27.1 app/models/decidim/system/admin.rb
decidim-system-0.26.4 app/models/decidim/system/admin.rb
decidim-system-0.27.0 app/models/decidim/system/admin.rb
decidim-system-0.26.3 app/models/decidim/system/admin.rb
decidim-system-0.27.0.rc2 app/models/decidim/system/admin.rb
decidim-system-0.27.0.rc1 app/models/decidim/system/admin.rb
decidim-system-0.26.2 app/models/decidim/system/admin.rb